I tried this in nodemon.json, seems like the command runs but doesn't set the variable:
"events":{
"start":"export PRIVATE_KEY=MyKey"
}
What's the proper way to set an environment variable?
You can, I think, add an env property to your nodemon file, or via the CLI
On Fri, 13 Nov 2015 13:23 Sergei Basharov [email protected] wrote:
I tried this in nodemon.json, seems like the command runs but doesn't set
the variable:"events":{
"start":"export PRIVATE_KEY=MyKey"
}What's the proper way to set an environment variable?
—
Reply to this email directly or view it on GitHub
https://github.com/remy/nodemon/issues/727.
This worked, thanks!
{
"env": {
"PRIVATE_KEY": "MyKey",
"DOCKER_MONGODB": "192.168.99.100:8000"
}
}
If the issue is resolved, lets close it!
sorry, but what file does this go in?
{
"env": {
"PRIVATE_KEY": "MyKey",
"DOCKER_MONGODB": "192.168.99.100:8000"
}
}
@chovy
sorry, but what file does this go in?
{ "env": { "PRIVATE_KEY": "MyKey", "DOCKER_MONGODB": "192.168.99.100:8000" } }
It the nodemon.json file in the root directory.
@chovy
sorry, but what file does this go in?
{ "env": { "PRIVATE_KEY": "MyKey", "DOCKER_MONGODB": "192.168.99.100:8000" } }It the
nodemon.jsonfile in the root directory.
And also in the package.json, as the value for the "nodemonConfig" key.
Most helpful comment
This worked, thanks!