Site icon Shaharia's Blog

Start forever node command after reboot

Unfortunately by default forever will be terminated in every reboot of your system. So if you want to restart your forever script after every reboot.

Then you can simply handle that with crontab @reboot attribute. Here is the crontab command you need simply.


@reboot /usr/local/bin/forever start yourNodeJSAppStartFile.js