我想在永远模块(https://github.com/nodejitsu/forever)的帮助下运行docpac。我在Debian服务器上
docpad 6.53.0和node.js 0.10.15。但是当我这样做

cd mydocpad-website
forever start <path_to_docpad>/docpad run


我在日志文件中发现以下错误:

info: Welcome to DocPad v6.53.0, local installation
info: Contribute: http://docpad.org/docs/contribute
info: Plugins: eco, highlightjs, marked, paged
info: Environment: development
error: Something went wrong with the action
error: An error occured:
Error: Could not start the web server, chances are the desired port 9778 is already in use
at Server.<anonymous> (/home/bru/website/node_modules/docpad/out/lib/docpad.js:4138:17)
at Server.g (events.js:175:14)
at Server.EventEmitter.emit (events.js:95:17)
at net.js:1043:12
at process._tickDomainCallback (node.js:459:13)


当我永远启动docpad时,一切正常。

我的计划是将@reboot永久放在crontab文件中。还是使用inittab更好?

感谢您的任何提示。

最佳答案

您是否尝试过传递env参数?

尝试:

forever start ./node_modules/docpad/bin/docpad run --env static

关于node.js - 使用永久模块运行的Docpad无法正常工作,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/19150559/

10-10 00:47