repositories
/
e-mobility-charging-stations-simulator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build(deps-dev): apply updates
[e-mobility-charging-stations-simulator.git]
/
ui
/
web
/
start.js
diff --git
a/ui/web/start.js
b/ui/web/start.js
index c620c4681ddc5d73fe051ffb5846ca3bbec8b1a9..3eb2838e8925cb1b38e872695e66162c97883607 100644
(file)
--- a/
ui/web/start.js
+++ b/
ui/web/start.js
@@
-2,17
+2,16
@@
import { createServer } from 'node:http'
import { dirname, join } from 'node:path'
import { env } from 'node:process'
import { fileURLToPath } from 'node:url'
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'
const isCFEnvironment = env.VCAP_APPLICATION != null
import finalhandler from 'finalhandler'
import serveStatic from 'serve-static'
const isCFEnvironment = env.VCAP_APPLICATION != null
-const PORT = isCFEnvironment ? parseInt(env.PORT) : 3030
+const PORT = isCFEnvironment ?
Number.
parseInt(env.PORT) : 3030
const uiPath = join(dirname(fileURLToPath(import.meta.url)), './dist')
const serve = serveStatic(uiPath)
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(`Web UI running at: http://localhost:${PORT}`))
server.listen(PORT, () => console.info(`Web UI running at: http://localhost:${PORT}`))