Closed joe-at-startupmedia closed 6 months ago
Not necessary. The proper way to do this is using the "interpreter" as the program name and the script as a value provided to the --args command:
pmon3 exec /usr/local/bin/node --args "/path/to/node/app.js" --name=app
Currently pmond assumes the first (and only) argument of the exec cmd is a binary. pmon3 does not allow multiple arguments for the exec cmd. This makes the process manager only usable with binaries. Scripts cannot be executed which require the following format:
A work around is creating a bash script to do the same :
And then executing that using
pmon3 exec
The problem is that pmon3 only accounts resources usage for that of the bash script and not the resulting child process.
pm2 allows an interpreter flag and/or automatically handles execution of scripts using the proper interpreter