Setting Environment Variables for Node to retrieve

前端 未结 16 2157
-上瘾入骨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:12

    Came across a nice tool for doing this.

    node-env-file

    Parses and loads environment files (containing ENV variable exports) into Node.js environment, i.e. process.env - Uses this style:

    .env
    
    # some env variables
    
    FOO=foo1
    BAR=bar1
    BAZ=1
    QUX=
    # QUUX=
    

提交回复
热议问题