Skip to content
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

feat: supports retrieving the port from the configuration file (#250) #251

Merged
merged 4 commits into from
Feb 1, 2024

Conversation

JarryChung
Copy link
Contributor

@JarryChung JarryChung commented Jan 29, 2024

Checklist
  • npm test passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)
  • egg-bin
Description of change

Adjust the order in which ports are obtained:option --port > egg.js configuration config/config.*.js > process.env.EGG_BIN_DEFAULT_PORT > 7001 > other available ports.

image

closes #250

Copy link

vercel bot commented Jan 29, 2024

Someone is attempting to deploy a commit to the no-veronica Team on Vercel.

A member of the Team first needs to authorize it.

@JarryChung
Copy link
Contributor Author

see issue #250

@JarryChung JarryChung marked this pull request as ready for review January 30, 2024 06:10
@fengmk2 fengmk2 self-assigned this Feb 1, 2024
Copy link
Member

@fengmk2 fengmk2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fengmk2
Copy link
Member

fengmk2 commented Feb 1, 2024

@JarryChung 单测没通过,需要看看

Copy link

codecov bot commented Feb 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (34e3b92) 100.00% compared to head (54d90c4) 100.00%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #251   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           13        13           
  Lines           95        95           
  Branches        19        19           
=========================================
  Hits            95        95           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JarryChung
Copy link
Contributor Author

@fengmk2 我关注到单测的 demo-app 不是一个标准的 egg 应用,会导致获取配置文件失败,因此我将获取配置文件的逻辑放在 try...catch... 中了,当获取失败时,使用原来的的逻辑。这个处理方式应该要健壮一些,可以避免外部依赖带来的影响。

@fengmk2 fengmk2 merged commit 07e150f into eggjs:master Feb 1, 2024
15 of 17 checks passed
fengmk2 pushed a commit that referenced this pull request Feb 1, 2024
[skip ci]

## [6.8.0](v6.7.0...v6.8.0) (2024-02-01)

### Features

* supports retrieving the port from the configuration file ([#251](#251)) ([07e150f](07e150f))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

egg-bin@6,默认端口覆盖了 config.default.js 中配置的端口
2 participants