Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run with forever or PM2 #19

Open
benag opened this issue Feb 15, 2017 · 6 comments
Open

run with forever or PM2 #19

benag opened this issue Feb 15, 2017 · 6 comments

Comments

@benag
Copy link

benag commented Feb 15, 2017

stupid question but I dont manage to run this with forever I tries to run the sh file in bin with forever but it didn't work

@raisen
Copy link

raisen commented Feb 24, 2017

Try this from within the lib folder:

pm2 start --node-args="--harmony" index.js -- -p <port> -d <dir>

@benag
Copy link
Author

benag commented Apr 12, 2017

I am trying this in production.
when i am doing pm2 start --node-args="--harmony" index.js -- -p 8080 -d /home...
I get EADDRINUSE :::8080 and when i do lsof -i :8080 i dont get any processes.
When i change the port to 8090 the script above doesnt work and still listens to 8080.
if i take the -- out then:
pm2 start --node-args="--harmony" index.js -p 8090 -d /home...
then it seems to listen to 8090 but then says that -d is not recognized.
note that:
node index.js -p 8090 -d /home...
works fine.

Any ideas?

@benag
Copy link
Author

benag commented Apr 18, 2017

Can you look into this issue why i am not able to set a port with pm2 ?

@efeiefei
Copy link
Owner

@benag :

@raisen 's solution is correct.
You need use lsof -i tcp:8080 to check the process.
You should pm2 stop id firstly.

@creativefull
Copy link

i also got error like this

@keithics
Copy link

pm2 start index.js --name="filenamanager" -i 4
visit port myhost:5000 in the browser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants