express-js-mvc/.express/init/server.js
KLxHunter 346845fb15 init
2024-09-10 19:12:45 +07:00

23 lines
349 B
JavaScript

export const PORT = normalizePort(process.env.PORT || '3000')
/**
* Normalize a port into a number, string, or false.
*/
function normalizePort(val) {
var port = parseInt(val, 10);
if (isNaN(port)) {
// named pipe
return val;
}
if (port >= 0) {
// port number
return port;
}
return false;
}