X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=ui%2Fweb%2Fstart.js;h=46a8bb75884f67da0c4b2ecfc9138bff44fb7ab2;hb=276e05aec38f4e8b4a8d5ebd8cbbcb30592b414d;hp=99a794d5af59c699674895225e03bf921bfa192b;hpb=68220b423c52da387fdf41967dd8c738da0ff52e;p=e-mobility-charging-stations-simulator.git diff --git a/ui/web/start.js b/ui/web/start.js index 99a794d5..46a8bb75 100644 --- a/ui/web/start.js +++ b/ui/web/start.js @@ -2,6 +2,7 @@ import { createServer } from 'node:http' import { dirname, join } from 'node:path' import { env } from 'node:process' import { fileURLToPath } from 'node:url' + import finalhandler from 'finalhandler' import serveStatic from 'serve-static' @@ -11,8 +12,6 @@ const uiPath = join(dirname(fileURLToPath(import.meta.url)), './dist') const serve = serveStatic(uiPath) -const server = createServer(function onRequest(req, res) { - serve(req, res, finalhandler(req, res)) -}) +const server = createServer((req, res) => serve(req, res, finalhandler(req, res))) -server.listen(PORT, () => console.info(`App running at: http://localhost:${PORT}`)) +server.listen(PORT, () => console.info(`Web UI running at: http://localhost:${PORT}`))