ohhh, I haven’t used those yet, but i imagine that you could need to add as another app on pm2. that way pm2 handles it the same way as your api/web sides(?)
I HAVENT TRIED THIS
// ecosystem.config.js
module.exports = {
apps: [
{
name: 'api',
cwd: 'current',
script: 'node_modules/.bin/rw',
args: 'serve api',
instances: 'max',
exec_mode: 'cluster',
wait_ready: true,
listen_timeout: 10000,
},
{
name: 'bg-jobs',
cwd: 'current',
script: 'node_modules/.bin/rw',
args: 'jobs start',
instances: 'max',
exec_mode: 'cluster',
wait_ready: true,
listen_timeout: 10000,
},
],
};