If I run my node-express site by hand it works great.
sudo node bin/www
But my other sites are launched and spawn via pm2.
With pm2 I just setup the node startup site.js file and executable and just run ./site.js
So pm2 just has to run ./site.js
But this is the first node-express site I've ever tried to run using pm2.
So what I'm not getting is how to make it so pm2 can run the command node bin/www
.
I've tried by making the bin/www
file executable. And it has the same first line in the file #!/usr/bin/env node
But pm2 just will not run it. When I try pm2 echos --help to the console because it fails to interpret the command sudo pm2 node bin/www
How do you get pm2 to run such a command?
via user5903880
No comments:
Post a Comment