node-file-manager icon indicating copy to clipboard operation
node-file-manager copied to clipboard

run with forever or PM2

Open benag opened this issue 8 years ago • 6 comments

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

benag avatar Feb 15 '17 18:02 benag

Try this from within the lib folder:

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

raisen avatar Feb 24 '17 20:02 raisen

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 avatar Apr 12 '17 15:04 benag

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

benag avatar Apr 18 '17 17:04 benag

@benag :

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

efeiefei avatar Apr 21 '17 03:04 efeiefei

i also got error like this

creativefull avatar May 01 '17 07:05 creativefull

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

keithics avatar May 17 '17 13:05 keithics