File tree 5 files changed +45
-9
lines changed
5 files changed +45
-9
lines changed Original file line number Diff line number Diff line change 1
- var sqlite3 = require ( 'sqlite3' ) . verbose ( ) ;
1
+ // Remove the quotes below and fill in <proxy-ip> and <proxy-port> if you use a proxy
2
+ //require('./http-proxy')('<proxy-ip>',<proxy-port>);
2
3
4
+ var sqlite3 = require ( 'sqlite3' ) . verbose ( ) ;
3
5
var dbName = 'nest.db' ;
4
6
var serverLocation = 'ssh://<ip-address>' ;
5
7
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ Getting started
14
14
Install SQLite3
15
15
16
16
sudo apt-get update
17
- sudo apt-get install sqlite3 git-core -y
17
+ sudo apt-get install sqlite3 git-core curl -y
18
18
19
19
Install node dependencies
20
20
@@ -27,6 +27,11 @@ Install bower dependencies
27
27
28
28
### Setup database and server
29
29
30
+ If you have a proxy you need to add it to these to files on line 2:
31
+
32
+ nano +2 Gruntfile.js
33
+ nano +2 templates/.bowerrc
34
+
30
35
Run tests and sync with official Bower repository
31
36
32
37
grunt
@@ -35,9 +40,6 @@ Configure server location
35
40
36
41
grunt config:<ip-address >: port
37
42
38
- If you have a proxy
39
-
40
- gedit templates/.bowerrc
41
43
42
44
Configure SSH on your server
43
45
Original file line number Diff line number Diff line change 1
1
var server = require ( './server/server' ) ;
2
2
3
- var port = < port > ;
3
+ var port = ' <port>' ;
4
4
5
- server.start(port);
5
+ server . start ( parseInt ( port , 10 ) ) ;
Original file line number Diff line number Diff line change
1
+ var http = require ( 'http' ) ;
2
+ var __request = http . request ;
3
+ exports . request = __request ;
4
+
5
+ var proxy = {
6
+ host : '' ,
7
+ port : 0
8
+ } ;
9
+
10
+ var _debug = false ;
11
+
12
+ http . request = function ( options , callback ) {
13
+ var __options = options ;
14
+ __options . path = 'http://' + options . host + options . path ;
15
+ __options . host = proxy . host ;
16
+ __options . port = proxy . port ;
17
+ if ( _debug ) {
18
+ console . log ( '=== http-proxy.js begin debug ===' ) ;
19
+ console . log ( JSON . stringify ( __options , null , 2 ) ) ;
20
+ console . log ( '=== http-proxy.js end debug ===' ) ;
21
+ }
22
+ var req = __request ( __options , function ( res ) {
23
+ callback ( res ) ;
24
+ } ) ;
25
+ return req ;
26
+ } ;
27
+
28
+ module . exports = function ( host , port , debug ) {
29
+ proxy . host = host ;
30
+ proxy . port = port ;
31
+ _debug = debug || false ;
32
+ } ;
Original file line number Diff line number Diff line change 1
1
{
2
+ "proxy": "",
2
3
"directory": "bower_components",
3
4
"registry": "http://<ip-address>:<port>",
4
5
"registry.search": "http://<ip-address>:<port>",
5
6
"registry.register": "http://<ip-address>:<port>",
6
- "registry.publish": "http://<ip-address>:<port>",
7
- "proxy": ""
7
+ "registry.publish": "http://<ip-address>:<port>"
8
8
}
You can’t perform that action at this time.
0 commit comments