Skip to content

Commit

Permalink
Fix to pm2 startup script
Browse files Browse the repository at this point in the history
  • Loading branch information
Khaaz committed Sep 24, 2018
1 parent 9e14983 commit a6bef9f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions scripts/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@ const pm2 = require('pm2');

// Start process
console.log('>> Starting webSpell');
pm2.connect(function(err) {
pm2.connect((err) => {
if (err) {
console.error(err);
process.exit(2);
}
pm2.start({
script: 'stableMain.js',
args: [ '--color' ],
name: 'webSpell',
script: 'index.js',
args: ['--color'],
name: 'WebSpell',
exec_mode : 'fork',
max_memory_restart : '1G',
cwd: 'src/main',
cwd: 'src',
error: './logs/error.err',
output: './logs/output.log',
pid: './logs/pid.pid',
node_args: '-r esm',
autorestart: true,
wait_ready: true,
}, function(err) {
}, (err) => {
pm2.disconnect();
if (err) throw err;
});
Expand Down

0 comments on commit a6bef9f

Please sign in to comment.