undefinedfix
Sign in

How does nodejs load different. Env files with different commands and output different. Env files process.env?

user620553 edited in Fri, 25 Nov 2022

index.js

console.log(process.env.TOKEN)

Required effect:

node run dev
# 输出 'dev'

node run prod
# 输出 'prod'

How to make node load when running command env.development Or env.production What about it?

0 Replies