Not sure how forever works, but as an alternative, you can try pm2.
Create a file ecosystem.config.js in the project’s root directory with content:
module.exports = {
apps: [
{
name: 'you-app-name',
script: 'npm',
args: 'develop',
env: {
NODE_ENV: 'development',
},
exp_backoff_restart_delay: 100,
},
],
};
Now you can run the app with the command:
pm2 start ecosystem.config.js