thanks for the quick reply. I tried this as well. PM2 launches up without any issue (checked the running process). The only problem i am having is that the defined binary is not being launched. For some reason the pm2.start does not get executed. Any idea?
EDIT: the function is erroring and the error is null
weird. I am on OSX 10.12.X and my pm2 version seems to be
In memory PM2 version: 2.8.0
Local PM2 version: 2.3.0
What OS are you on?
tried pm2 update - keep showing 2.3.0 as local version.
the error and stdout data is empty. If i do pm2 list after running the above meteor app (even with your suggested edits) it is empty. Seems it won’t run the binary but only launch up pm2.
Not sure about your version differences. I just installed pm2 from scratch (meteor npm i -g pm2), created a new meteor project, and installed the API in that (meteor i --save pm2). Incidentally, that’s v2.8.0.
Is your script path correct? You could try with something like /bin/ls
@robfallows - trying it with something like ls or date indeed works well. Using it with my custom binary located in myproject/private/bins/binary or myproject/server/binary fails. Any idea on how i could fix this? I suspect its a path related issue.
EDIT: placing the custom binary in a place like /Applications/ on osx or /usr/bin on linux is a hackaround. I still prefer executing the binary out of my meteor application folder.
Are you using relative paths (including implied relative) - paths like app.js, bin/app.sh?
If you are, you need to be aware that in development mode, your app is not running in your project root - it’s actually in /path/to/your/app/.meteor/local/build/. In production, it’s relative to the ROOT_URL environment variable.