Last active
July 8, 2019 10:53
-
-
Save BertiKarsunke/1d571706e78944a62a1191fbc19506c7 to your computer and use it in GitHub Desktop.
node_env
This file contains hidden or 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
process.env.NODE_ENV = ( process.env.NODE_ENV && ( process.env.NODE_ENV ).trim().toLowerCase() == 'production' ) ? 'production' : 'development'; | |
if (process.env.NODE_ENV == 'production') { | |
CONFIG = CONFIG.production; | |
console.log("Production Mode"); | |
} else if (process.env.NODE_ENV == 'development') { | |
console.log("Development Mode"); | |
CONFIG = CONFIG.development; | |
} | |
//linux | |
export NODE_ENV=production | |
export NODE_ENV=development | |
//windows | |
set NODE_ENV=production | |
pm2 delete livechaton-msg-converter.json | |
pm2 start livechaton-msg-converter.json --env production |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment