Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
594 views
in Technique[技术] by (71.8m points)

How can I make Jelastic start PM2 to launch an 'npm' command instead of a file?

I'm using a Jelastic Node.js PM2 environment and I want my app to be started with something like the following:

pm2 start npm --name "app name" -- start

(my server is not a JS file).

The command runs fine if I use a Jelastic 'npm' environment, but I'd rather have the benefits of PM2. I tried setting various APP_FILE (start, npm start, a pm2 config file path), Entry Points and PROCESS_MANAGER_FILE, without success. I usually get this error:

Node ID : 53209
-----------------------
result 1 Failed to start 
Stopping nodejs server[  OK  ] Starting nodejs server [FAILED]
question from:https://stackoverflow.com/questions/65851935/how-can-i-make-jelastic-start-pm2-to-launch-an-npm-command-instead-of-a-file

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...