Install
npm install pm2@latest -g # or yarn global add pm2
module.exports = { apps : [ { name : 'yers', description : 'yer server', script : 'src/index.js', cwd : './projects/yer/service/', watch : false, error_file : './logs/err.log', out_file : './logs/out.log', args : '--port=8888', max_memory_restart : '500M', log_date_format : 'YYYY-MM-DD HH:mm Z' } ] };
pm2 ecosystem pm2 start ecosystem.config.js --only api-app