Setting Environment Variables for Node to retrieve

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

    As expansion of @ctrlplusb answer,
    I would suggest you to also take a look to the env-dot-prop package.

    It allows you to set/get properties from process.env using a dot-path.

    Let's assume that your process.env contains the following:

    process.env = {
      FOO_BAR: 'baz'
      'FOO_

提交回复
热议问题