[Node.js] Hanlde process.env with dotenv
import * as dotenv from "dotenv";
const result = dotenv.config();
if (result.error) {
console.log('Error loading environment variables, aborting.')
process.exit(1)
}
console.log(process.env.PORT)
import * as dotenv from "dotenv";
const result = dotenv.config();
if (result.error) {
console.log('Error loading environment variables, aborting.')
process.exit(1)
}
console.log(process.env.PORT)