Forever command on re-boot (Node.js)


#1

Hi,

I am running a node.js server on my RaspberryPi and I cannot figure out how to properly program the script to run forever and the server on re-boot. The forever program runs fine (but I don’t think I installed it globally, so I have to go into the directory where the server.js file is to get it to run…)

I’d really appreciate it if someone could help me get the server to run on boot-up (in case the Pi crashes…)
I know it’s a simple script, but no matter how I configure the script, forever is not running on boot-up…

Thanks!


#2

I have a nodejs running as a daemon in my HomeCloudHub github repository. The readme walks you through the steps of making it a system service, maybe that helps


#3

Thanks…I will take a look at it…my knowledge of Linux is not very high, so I probably need this one spoon-fed to me…


#4

It’s fairly spoon fed. And I can guide you through, when I wake up (lol)


#5

Lol…I know you’re busy…this is just something I’ve wanted to fix for a while, so it would be nice…the forever is working perfectly.I just need to get that script written properly. I looked at it…I think I get it…but I’m trying to use the forever service I already installed…