mis map dans static, corrig serveur static
This commit is contained in:
parent
445be5f7ff
commit
e56947fad4
2 changed files with 3 additions and 2 deletions
|
@ -39,10 +39,11 @@ var server = http.createServer(option, function(req, res){
|
|||
if(q.pathname.includes(".."))
|
||||
filename = "static/dotdot.html";
|
||||
if(q.pathname == "/")
|
||||
filename = "map.html";
|
||||
filename = "static/map.html";
|
||||
fs.readFile(filename, function(err, data) {
|
||||
if (err) {
|
||||
res.writeHead(404, {'Content-Type': 'text/html'});
|
||||
console.log("404: ", q.pathname, filename);
|
||||
res.writeHead(404, {'Content-Type': 'text/html'});
|
||||
return res.end("404 Not Found");
|
||||
}
|
||||
res.writeHead(200, {'Content-Type': 'text/html'});
|
||||
|
|
Loading…
Reference in a new issue