Last active
May 3, 2018 07:22
-
-
Save vunb/89ca86992f379dc699fe to your computer and use it in GitHub Desktop.
Run node.js application in production mode
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
#!/bin/sh | |
#set enviroment before start script | |
NODE_ENV=production forever start ./bin/node.js | |
#Reference | |
#https://stackoverflow.com/questions/22312671/node-js-setting-environment-variables | |
#https://stackoverflow.com/questions/9396953/how-can-i-run-node-js-express-in-production-mode-via-sudo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment