我想在forever模块(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更好吗?
感谢任何提示。
答案 0 :(得分:2)
您是否尝试过传递env参数?
尝试:
forever start ./node_modules/docpad/bin/docpad run --env static