主要是用的是默认的配置覆盖能力。 http://www.midwayjs.org/pandora/zh-cn/base/global_config.html
比如,你想pandora 的启动端口从 7002 变为 3000,那么可以这么做。
// config.js
module.exports = {
actuator: {
http: {
port: 3000 // 覆盖默认的7002
}
}
}
在启动时通过环境变量传入即可。
export PANDORA_CONFIG=./config.js
$ pandora start