【发布时间】:2012-11-09 04:51:29
【问题描述】:
我在用这个人https://github.com/twilson63/express-coffee
要启动服务器,文档说要发出以下命令:
cake dev
有没有办法通过命令行选择端口号?类似于rails s --port 3010?
【问题讨论】:
我在用这个人https://github.com/twilson63/express-coffee
要启动服务器,文档说要发出以下命令:
cake dev
有没有办法通过命令行选择端口号?类似于rails s --port 3010?
【问题讨论】:
将“PORT=XXXX”放在“cake dev”之前:)
PORT=2000 cake dev
【讨论】:
$ NODE_PORT=3000 node ./app.js
在 app.js 中
var port = process.env.NODE_PORT;
【讨论】:
基于Cakefile,它看起来不是一个选项,但它应该很容易修复。查看frappe 中的 Cakefile(类似项目)。
【讨论】: