bugfix in http

This commit is contained in:
Jeena 2013-11-25 14:19:17 +01:00
parent 8f245f33d6
commit b77d209843

View file

@ -22,9 +22,16 @@ function (http, nodeStatic) {
this.server = http.createServer( this.server = http.createServer(
function (req, res) { function (req, res) {
req.addListener('data', function() { // doesn't work on Jeenas computer without this
//console.log("data")
});
req.addListener('end', function () { req.addListener('end', function () {
switch(true) { switch(true) {
case req.url == '/': case req.url == '/':
fileServer.serveFile('./static/html/index.html', 200, {}, req, res); fileServer.serveFile('./static/html/index.html', 200, {}, req, res);
console.checkpoint('HTTP Server serves index'); console.checkpoint('HTTP Server serves index');
break; break;
@ -57,6 +64,7 @@ function (http, nodeStatic) {
} }
); );
this.server.listen(options.port); this.server.listen(options.port);
console.checkpoint('start HTTP server'); console.checkpoint('start HTTP server');
} }