Unitech / pm2

Node.js Production Process Manager with a built-in Load Balancer.
https://pm2.keymetrics.io/docs/usage/quick-start/
Other
41.43k stars 2.62k forks source link

HELP Needed Unable to launch infernojs-website with pm2 #3116

Closed Yourdigitalheart closed 7 years ago

Yourdigitalheart commented 7 years ago

Hello everyone I have tried for the last 3 days to figure out. How to use pm2 with infernojs frameworks https://github.com/infernojs/inferno-website

I try many things and nothing works for me My case I normally use npm run prod or yarn run prod for build it locally. There is the script from package.json "scripts": { "dev": "cross-env NODE_ENV=development nodemon index.js", "prod": "cross-env NODE_ENV=production node index.js" },

I tried already all the technics i find on the wiki and also from many website. (ecosystem ... ) I really dont know why. Thanks

soyuka commented 7 years ago

May want to try:

pm2 start npm -- run prod

Or easier:

NODE_ENV=production pm2 start index.js
Yourdigitalheart commented 7 years ago

Works like a charm Thanks I feel a bit stupid :)