zapty / forever-service

Provision node script as a service via forever, allowing it to automatically start on boot, working across various Linux distros and OS
https://github.com/zapty/forever-service
MIT License
594 stars 65 forks source link

how to combine with nodemon #22

Closed nvcken closed 9 years ago

nvcken commented 9 years ago

I usually start node app by following command forever start -c nodemon app.js --exitcrash

how can I make forever-service work with nodemon ?

arvind-agarwal commented 9 years ago

I would try forever-service install myservice -f " -c nodemon" -o " --exitcrash"

arvind-agarwal commented 9 years ago

@nvcken did that work for you?

nvcken commented 9 years ago

I have not test complete yet, because after I run script by following your guide, I run "service myservice_name start" I get error

/etc/init.d/myservice_name : line 61 : forever command not found
starting myservice_name
/etc/init.d/myservice_name : line 75 : forever command not found
nvcken commented 9 years ago

I put export PATH=/usr/local/bin:$PATH Then service start was working. Now, I try test when system restart

nvcken commented 9 years ago

@arvind-agarwal Yes, It works, Thank you

arvind-agarwal commented 9 years ago

you can use -e "PATH=/usr/local/bin:\$PATH" as the parameter in forever-service cli to add the PATH variable to your startup script