Skip to content

Instantly share code, notes, and snippets.

@l2ysho
Created September 26, 2019 19:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save l2ysho/05dc6929d05da6f161f65a628f4f13ce to your computer and use it in GitHub Desktop.
Save l2ysho/05dc6929d05da6f161f65a628f4f13ce to your computer and use it in GitHub Desktop.
Usefull config files
save-exact=true
message="v%s"
/**
* Start script for pm2
* usage: pm2 start ecosystem.config.js
*/
require('dotenv').config();
module.exports = {
apps: [
{
name: 'Name',
script: 'npm',
args: 'start',
autorestart: true,
instance_var: 'Name',
out_file: `${process.env.LOGS_PATH || 'logs'}/out.log`,
log_file: `${process.env.LOGS_PATH || 'logs'}/pm2.log`,
error_file: `${process.env.LOGS_PATH || 'logs'}/error.log`
}
]
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment