Merge dependabot/npm_and_yarn/types/node-20.8.10 into combined-prs-branch
[e-mobility-charging-stations-simulator.git] / ui / web / start.js
index c73a2b320413c008b9d29a3bae392a7d683ca201..9b18156cffee67d340d172bfac4753c40fd9f3a6 100644 (file)
@@ -1,10 +1,11 @@
-const finalhandler = require('finalhandler'),
-  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);