-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
egg-bin@6,默认端口覆盖了 config.default.js 中配置的端口 #250
Labels
Comments
JarryChung
pushed a commit
to JarryChung/egg-bin
that referenced
this issue
Jan 29, 2024
@JarryChung 可以来个 pr 修复一下,恢复跟之前的版本逻辑一致 |
@fengmk2 已添加测试用例,已在文档中注明获取端口顺序,已补充 PR 说明 |
4 tasks
@JarryChung PR 很完善!今天会合并发布 |
fengmk2
pushed a commit
that referenced
this issue
Feb 1, 2024
Adjust the order in which ports are obtained:option `--port` > [_egg.js_ configuration](https://www.eggjs.org/basics/config) `config/config.*.js` > `process.env.EGG_BIN_DEFAULT_PORT` > 7001 > other available ports. ![image](https://github.com/eggjs/egg-bin/assets/35088591/ab8ffafd-c3f3-414b-a46e-a0a8fb897a17) closes #250 --------- Co-authored-by: tiga <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
问题描述
如上图,egg-bin@4、egg-bin@5 中,当 detect 到的端口与
defaultPort
一致时,将不会赋值给argv.port
,导致argv.port
为空,进而用了 config.default.js 里面配置的port
。如上图,在 egg-bin@6 中,任何情况都会赋值
this.port
,也就意味着不会使用到 config.default.js 中配置的port
。与 6 版本相比,4/5 看起来是 bug 逻辑,但表现上符合业务预期。6 是正常逻辑,但表现上不符合业务预期。
期望
致谢!
The text was updated successfully, but these errors were encountered: