Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set environment variables? #44

Closed
saeta-eth opened this issue Jan 10, 2018 · 1 comment
Closed

How to set environment variables? #44

saeta-eth opened this issue Jan 10, 2018 · 1 comment

Comments

@saeta-eth
Copy link

Hi, I'm having troubles when I want to set environment variables.
I think that the best way is using diferent tasks on the script field inpackage.json to add this values but I don't know.

Do you know how I can create this task to get different values depends of the environment?

Thanks.

@developit
Copy link
Owner

"scripts": {
  "start": "FOO=bar node ."
}

or:

FOO=bar npm start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants