node-file-manager
node-file-manager copied to clipboard
run with forever or PM2
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
Try this from within the lib folder:
pm2 start --node-args="--harmony" index.js -- -p <port> -d <dir>
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?
Can you look into this issue why i am not able to set a port with pm2 ?
@benag :
@raisen 's solution is correct.
You need use lsof -i tcp:8080 to check the process.
You should pm2 stop id firstly.
i also got error like this
pm2 start index.js --name="filenamanager" -i 4 visit port myhost:5000 in the browser