mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
bugfix in http
This commit is contained in:
parent
8f245f33d6
commit
b77d209843
1 changed files with 8 additions and 0 deletions
|
|
@ -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');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue