Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save italosantana/c69e0f5ac270d1bac36f3fe7a075b3cc to your computer and use it in GitHub Desktop.

Select an option

Save italosantana/c69e0f5ac270d1bac36f3fe7a075b3cc to your computer and use it in GitHub Desktop.
Setting environment variables package.json
Make it cross-platform by using cross-env:
"server": "cross-env SERVERPORT=3002 node ./fiboserver"
Linux
"scripts": {
"dev:linux": "NODE_ENV=development node foo.js"
}
Windows 10
"scripts": {
"start": "SET NODE_ENV=development & nodemon app/app.js",
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment