Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm,doc: 'npm start' launch app using pm2 #33

Closed
wants to merge 1 commit into from
Closed

Conversation

makemek
Copy link
Owner

@makemek makemek commented Apr 25, 2017

Npm Scripts

The original npm start doesn't load environment variables into the application.
Even though you can launch the app with node bin/www, you have to set environment manually inside the command line.
And there are lots of them.

pm2 is more convinient because environment varaibles are defined in process.yml, and it can also do cluster mode which is handy in production.
Let's put the launch script inside npm start as well to ease remembering pm2's command.

Update to README.md

Indicates launching mode to be more prominent.
Easy-to-see header with remarks in npm start

* 'npm start' loads env from process.yml using pm2
* easy-to-see header with remarks in npm start
@coveralls
Copy link

Coverage Status

Coverage remained the same at 99.144% when pulling c3be776 on npm-start-pm2 into d7eb04b on master.

makemek added a commit that referenced this pull request Apr 25, 2017
* 'npm start' loads env from process.yml using pm2
* easy-to-see header with remarks in npm start

PR-URL: #33
@makemek
Copy link
Owner Author

makemek commented Apr 25, 2017

Landed in 30ca19c

@makemek makemek closed this Apr 25, 2017
@makemek makemek deleted the npm-start-pm2 branch April 25, 2017 07:30
makemek added a commit that referenced this pull request Apr 26, 2017
* 'npm start' loads env from process.yml using pm2
* easy-to-see header with remarks in npm start

PR-URL: #33
makemek added a commit that referenced this pull request May 1, 2017
* 'npm start' loads env from process.yml using pm2
* easy-to-see header with remarks in npm start

PR-URL: #33
makemek added a commit that referenced this pull request May 1, 2017
* 'npm start' loads env from process.yml using pm2
* easy-to-see header with remarks in npm start

PR-URL: #33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants