thanks for the response @sunnyson but unfortunately, it doesn’t work. Here’s what I did:
- installed pm2 (sudo npm install pm2 -g)
- from the app root directory (pm2 init)
- I edited the file "ecosystem.config.js) and replaced its content with the code you provided.
module.exports = {
apps: [
{
name: 'you-app-name',
script: 'npm',
args: 'develop',
env: {
NODE_ENV: 'development',
},
exp_backoff_restart_delay: 100,
},
],
};
I don’t know if I have to create an env variable or something but it’s still not working. Instead, I’m doing (pm2 start “yarn develop” ) and that works fine but I would like to work with the config file for future work.