File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change 21
21
"directories" : { "test" : " ./test" },
22
22
"scripts" : {
23
23
"test" : " vows --spec" ,
24
- "start" : " node app .js"
24
+ "start" : " node server .js"
25
25
},
26
26
"name" : " node-migrator-bot" ,
27
27
"author" : " Farrin A. Reid" ,
Original file line number Diff line number Diff line change
1
+ var spawn = require ( 'child_process' ) . spawn ,
2
+ http = require ( 'http' ) ,
3
+ path = require ( 'path' ) ;
4
+
5
+ var server = http . createServer ( function ( req , res ) {
6
+ res . setHeader ( 302 , { 'Location' : 'http://github.com/blakmatrix/node-migrator-bot' } ) ;
7
+ res . end ( 'Redirecting you to the github page for this project!' ) ;
8
+ } ) ;
9
+
10
+ // Start the npm running.
11
+ var bot = spawn ( 'node' , [
12
+ path . resolve ( __dirname , 'app.js' ) ,
13
+ 'npm'
14
+ ] ) ;
15
+
16
+ bot . stdout . pipe ( process . stdout ) ;
17
+ bot . stderr . pipe ( process . stderr ) ;
18
+
19
+ server . listen ( 8080 ) ;
You can’t perform that action at this time.
0 commit comments