How to set some Environment variables from within package.json
to be used with npm start
like commands
Here's what I currently have in my package.json
:
{
...
"scripts": {
"help": "tagove help",
"start": "tagove start"
}
...
}
Here I want to set environment variables (like NODE_ENV
) in the start script while still being able to start the app with just one command, npm start
.
suddenly i found that actionhero is using following code, that solved my problem by just passing
--NODE_ENV=production
in start script command option.i would really appreciate to accept answer of someone else who know more better way to set environment variables in package.json or init script or something like, where app bootstrapped by someone else.