X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=ui%2Fweb%2Fstart.js;h=9b18156cffee67d340d172bfac4753c40fd9f3a6;hb=38b2428f0046c84963f4e873b76bc440155da0f2;hp=523b52678f52dcfb6217a8927122088866566cd7;hpb=cbac237384185b5debef0c1e8b21e96f730104e5;p=e-mobility-charging-stations-simulator.git diff --git a/ui/web/start.js b/ui/web/start.js index 523b5267..9b18156c 100644 --- a/ui/web/start.js +++ b/ui/web/start.js @@ -1,10 +1,11 @@ -const http = require('http'), - path = require('path'), +const http = require('node:http'), + path = require('node:path'), + { env } = require('node:process'), finalhandler = require('finalhandler'), 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);