Created
September 17, 2015 09:19
-
-
Save rusintez/a0b816ab4d70f226a62a to your computer and use it in GitHub Desktop.
change envs on the fly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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