async/await
This commit is contained in:
@@ -16,5 +16,5 @@ http.createServer((req, res, r) => {
|
||||
|
||||
console.log(`[${(new Date()).toLocaleTimeString()}] ${req.method} ${req.url.pathname}`);
|
||||
|
||||
!(r = routes.getRegex(req.url.pathname, req.method)) ? res.end(`404 - ${req.url.pathname}`) : r(req, res);
|
||||
!(r = routes.getRegex(req.url.pathname, req.method)) ? res.writeHead(404).end(`404 - ${req.url.pathname}`) : r(req, res);
|
||||
}).listen(cfg.websrv.port, () => console.log(`f0ck is listening on port ${cfg.websrv.port}.`));
|
||||
|
Reference in New Issue
Block a user