Setting Environment Variables for Node to retrieve

前端 未结 16 2120
-上瘾入骨i
-上瘾入骨i 2020-11-22 15:41

I\'m trying to follow a tutorial and it says:

There are a few ways to load credentials.

  1. Loaded from environment variables,
16条回答
  •  眼角桃花
    2020-11-22 16:09

    You can set the environment variable through process global variable as follows:

    process.env['NODE_ENV'] = 'production';
    

    Works in all platforms.

提交回复
热议问题