Skip to content

Commit 221b1a8

Browse files
committed
node file moved
1 parent 241cc3e commit 221b1a8

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

index-node.js

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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);

index.js

-9
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,4 @@
1-
/*** Node Static ***/
21

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);
112

123
window.onload = function () {
134

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"devDependencies": {},
1010
"scripts": {
1111
"test": "echo \"Error: no test specified\" && exit 1",
12-
"start": "node index.js"
12+
"start": "node index-node.js"
1313
},
1414
"author": "",
1515
"license": "ISC"

0 commit comments

Comments
 (0)