map.js 271 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 var http = require('http'); var fs = require('fs'); var app = http.createServer(function(request,response){ var url=request.url; if(url == '/'){ url = '/mapPage.html'; } response.writeHead(200); response.end(fs.readFileSync(__dirname+url)); }); app.listen(8080);