我正在使用这个家伙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 (一个类似的项目)。