0

我已经在ubuntu上的以下路径中安装了永远永远的监视器/var/www/html/node_modules

现在我尝试/var/www/html/使用名称启动位于此路径的文件test.jsforever start test.js

但什么也没有发生。我已经全局安装了 forever. 我哪里错了?

test.js我有这个js代码:

var http = require('http');

http.createServer(function (request, response) {
  response.writeHead(200, {'Content-Type': 'text/plain'});
  response.end('testing. . .\n');
}).listen(8124);

console.log('Server running...');

尝试了这个命令ps -eaf | grep node并输出:

root     17101 16778  0 06:32 pts/0    00:00:00 nodejs chat_client.js
root     17318 16778  0 07:07 pts/0    00:00:00 nodejs my_queue_worker.js
root     17326 16778  0 07:08 pts/0    00:00:00 nodejs chat_client.js
root     17808 16778  0 07:50 pts/0    00:00:00 grep --color=auto node
4

0 回答 0