remove unnecisary async lambda

master
Avril 4 years ago
parent 691c14eede
commit 9ed73e48fc
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -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) => {
@ -22,4 +21,3 @@ console.log("Starting static server on port "+config.STATIC_PORT);
}
});
}).listen(config.STATIC_PORT);
})();

Loading…
Cancel
Save