-1

I have created a node application its working fine on my local server. Now i want to upload on live server and it will work permanently. I have found some links and do the same steps that are mentioned but still its not working(Link).

I have setup forever module on my local server.Its installed successfully and run all commands. but when i close my terminal my application works stop.

Also i my application i have created app.js file. According to link i have remove app.js file and move to server/server.js. but still its not working.

    terminal@mymac:/var/www/node/chat$ forever start server.js 
warn:    --minUptime not set. Defaulting to: 1000ms
warn:    --spinSleepTime not set. Your script will exit if it does not stay up for at least 1000ms
info:    Forever processing file: server.js

I got only this message when i start.

Community
  • 1
  • 1
Pritesh Mahajan
  • 4,974
  • 8
  • 39
  • 64

1 Answers1

2

Try:

nohup forever start server.js &

To read the logs of node, you can tail the nohup.txt file generate when running the nohup command

PS: If you apply this you will have to kill the process manually:

kill -9 <pid>
CMPS
  • 7,733
  • 4
  • 28
  • 53