如何持续运行 javascript.js 服务并监控其进程?

How to run the javascript.js service continuously and monitor its process?

我是 RedHat 和 nodeJS 的新手。我的 linux 目录中有一个文件:socketIO.js。我可以 运行 使用此命令的服务:

node socketIO.js

我可以从 PuTTY 监控它的进程。 然后我不断地安装 node-Forever 到 运行 服务。

npm install forever -g 

我尝试 运行:

forever start socketIO.js

服务是运行ning,但我无法监控进程。 那么如何运行节点socketIO.js持续监控其进程呢?

要监控进程,您可以使用 PM2