2

I am running [email protected] 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!

2

3 Answers 3

1

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

Sign up to request clarification or add additional context in comments.

Comments

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

Comments

1

Use an External Terminal not the Integrated Terminal

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.