File tree 3 files changed +11
-10
lines changed
3 files changed +11
-10
lines changed Original file line number Diff line number Diff line change
1
+ /*** Node Static ***/
2
+
3
+ var static = require ( 'node-static' ) ;
4
+ var file = new static . Server ( './' ) ;
5
+
6
+ require ( 'http' ) . createServer ( function ( request , response ) {
7
+ request . addListener ( 'end' , function ( ) {
8
+ file . serve ( request , response ) ;
9
+ } ) . resume ( ) ;
10
+ } ) . listen ( process . env . PORT || 3000 ) ;
Original file line number Diff line number Diff line change 1
- /*** Node Static ***/
2
1
3
- var static = require ( 'node-static' ) ;
4
- var file = new static . Server ( './' ) ;
5
-
6
- require ( 'http' ) . createServer ( function ( request , response ) {
7
- request . addListener ( 'end' , function ( ) {
8
- file . serve ( request , response ) ;
9
- } ) . resume ( ) ;
10
- } ) . listen ( process . env . PORT || 3000 ) ;
11
2
12
3
window . onload = function ( ) {
13
4
Original file line number Diff line number Diff line change 9
9
"devDependencies" : {},
10
10
"scripts" : {
11
11
"test" : " echo \" Error: no test specified\" && exit 1" ,
12
- "start" : " node index.js"
12
+ "start" : " node index-node .js"
13
13
},
14
14
"author" : " " ,
15
15
"license" : " ISC"
You can’t perform that action at this time.
0 commit comments