2

I am running config@1.29.4 and I am attempting to get settings from the environment variables using .\config\custom-environment-variables.json does not work. However, it reads from the .\config\default.json just fine.

.\config\custom-environment-variables.json

{
  "jwtPrivateKey": "sс_jwtPrivateKey"
}

.\config\default.json

{
  "jwtPrivateKey": "default"
}

console.log(config.get('jwtPrivateKey')) always prints default

I made this in cmd: SET sс_jwtPrivateKey=12345678

I tried new version of config, the same situation.

It prints nothing when I set the key property in config/default to an empty string. How can I resolve this?

How to get the value of sc_jwtPrivateKey?

THANK YOU!

MokkieBear
  • 31
  • 6

3 Answers3

1

I solved the problem as follows: Instead SET sс_jwtPrivateKey=12345678, I used SETX sс_jwtPrivateKey 12345678.

MokkieBear
  • 31
  • 6
1

Try this following command in windows powershell to set the value of sc_jwtPrivateKey

$env:sс_jwtPrivateKey="12345678"

Or try this following in cmd

set sс_jwtPrivateKey=12345678
tareq aziz
  • 749
  • 4
  • 11
1

Use an External Terminal not the Integrated Terminal

Darshan17
  • 101
  • 1
  • 3