Skip to content

Instantly share code, notes, and snippets.

@rusintez
Created September 17, 2015 09:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rusintez/a0b816ab4d70f226a62a to your computer and use it in GitHub Desktop.
Save rusintez/a0b816ab4d70f226a62a to your computer and use it in GitHub Desktop.
change envs on the fly
# USAGE:
# production node -e 'console.log(process.env.HELLO)'
# staging node -e 'console.log(process.env.HELLO)'
#
production() {
NODE_ENV=production \
HELLO=world \
FOO=bar \
$*
}
staging() {
HELLO=hi \
FOO=baz \
$*
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment