I'm trying to use nodemon with forever.
I have no problems with nodemon alone:
nodemon --exitcrash node/index.js -- "user/verbs/config"
However, in following the instructions in the nodemon FAQ, and putting quotes around "nodemon --exitcrash" as per the comment at https://stackoverflow.com/a/20306929/271577 (to avoid forever thinking the argument "user/verbs/config" is the file) to produce:
forever start --minUptime 1000 --spinSleepTime 1000 --killSignal=SIGTERM -c "nodemon --exitcrash" node/index.js -- "user/verbs/config"
...I get the message
info: Forever processing file: node/index.js
and no continuation of the script. Running forever list shows "No forever processes running".
(Note: I eventually want this working with forever-monitor, but I figure the above will need to work first.)
Is there something I'm missing?
this makes sure
nodemonactually exits (rather than giving you the "app crashed" message) and thenforeverpicks it up again.In
forever --helpthis-cspecifies a command to run otherwise it defaults node. Without -c results in the error that is mention in the comments to this answer.Source