|
|
|
@ -5,8 +5,7 @@ const fs = require('fs'),
|
|
|
|
|
|
|
|
|
|
console.log("Starting static server on port "+config.STATIC_PORT);
|
|
|
|
|
|
|
|
|
|
(async () => {
|
|
|
|
|
await http.createServer((req, res) => {
|
|
|
|
|
http.createServer((req, res) => {
|
|
|
|
|
let url = req.url;
|
|
|
|
|
if(!req.url || req.url == "" || req.url == "/") url = "/index.html";
|
|
|
|
|
fs.readFile(config.STATIC_LOCATION + url, (err, data) => {
|
|
|
|
@ -21,5 +20,4 @@ console.log("Starting static server on port "+config.STATIC_PORT);
|
|
|
|
|
res.end(data);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}).listen(config.STATIC_PORT);
|
|
|
|
|
})();
|
|
|
|
|
}).listen(config.STATIC_PORT);
|
|
|
|
|