X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=ui%2Fweb%2Fstart.js;h=9b18156cffee67d340d172bfac4753c40fd9f3a6;hb=467dd11dcda062e6b073f990783491bf6fc60ea0;hp=ed6e3e01ff65c0f81696ba9805a5b622f8c5169c;hpb=ebbfbf1c01e010d051956867484b74a94237f546;p=e-mobility-charging-stations-simulator.git diff --git a/ui/web/start.js b/ui/web/start.js index ed6e3e01..9b18156c 100644 --- a/ui/web/start.js +++ b/ui/web/start.js @@ -1,10 +1,11 @@ -const path = require('path'), +const http = require('node:http'), + path = require('node:path'), + { env } = require('node:process'), finalhandler = require('finalhandler'), - http = require('http'), serveStatic = require('serve-static'); -const isCFEnvironment = process.env.VCAP_APPLICATION !== undefined, - PORT = isCFEnvironment ? parseInt(process.env.PORT) : 3030, +const isCFEnvironment = env.VCAP_APPLICATION !== undefined, + PORT = isCFEnvironment ? parseInt(env.PORT) : 3030, uiPath = path.join(__dirname, './dist'); const serve = serveStatic(uiPath);