Last active
November 11, 2020 06:53
-
-
Save kubido/1bcbbc9f4bc615a84cbd9d943f40fecc to your computer and use it in GitHub Desktop.
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
module.exports = { | |
apps: [ | |
{ | |
name: 'entertainme - Client', | |
script: 'cd client && yarn install && yarn start', | |
}, | |
{ | |
name: 'entertainme - Orchestrator', | |
script: 'cd server/orchestrator/graphql && npm install && nodemon app.js', | |
}, | |
{ | |
name: 'entertainme - Service Movies', | |
script: 'cd server/services/movies && npm install && nodemon app.js', | |
env: { | |
DATABASE_NAME: "EntertainMe", | |
COLLECTION_NAME: "Movies" | |
}, | |
}, | |
{ | |
name: 'entertainme - Service TV Series', | |
script: 'cd server/services/series && npm install && nodemon app.js', | |
env: { | |
DATABASE_NAME: "EntertainMe", | |
COLLECTION_NAME: "TvSeries" | |
}, | |
}, | |
], | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Folder Structure
HOW
npm install -g pm2
pm2 start ecosystem.config.js
process.ENV.DATABASE_NAME
&process.ENV.COLLECTION_NAME
in your codeCommands
pm2 ls
: check proses yang sedang runningpm2 stop <process_id>
pm2 start <process_id>
pm2 logs
pm2 logs <process_id>