NPM继续运行hastebin服务器

时间:2014-12-16 03:01:10

标签: node.js apache ssh npm server

我在/ var / www / paste / hastebin /

安装了hastebin

要启动NPM服务器,我必须导航到hastebin位置,然后输入:

npm start

这使服务器以此

运行
# npm start

> haste@0.1.0 start /var/www/paste/hastebin/
> node server.js

info: compressed application.js into application.min.js
info: loading static document name=about, path=./about.md
info: listening on 0.0.0.0:7777
debug: loaded static document success=true

如果我从我的ssh会话中断开连接,我就不得不举例:7777

断开连接后,我该怎么做才能保持此功能。

1 个答案:

答案 0 :(得分:0)

要保持会话开放,我建议安装screen

运行screen以打开“幕后花絮”的终端会话 - 然后一旦运行npm start命令,只需按CTRL + AD即可“断开”屏幕会话。

现在服务应该在后台运行。

希望这有帮助!

相关问题