I've installed node on my ubuntu virtual private server and I SSH into it. I run
$nodejs index.js
but after running the file, I'm now stuck in the node command prompt and I can only get out by pressing ctrl-C. But doing that stops my nodejs server. I want to run my server and then go back to the shell and do other things. How do I do this?
Use PM2. It is a process manager. You can do whatever after initiate this on the server. https://github.com/Unitech/pm2
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.