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

chore(mock): check process.env.MIDWAY_HTTP_PORT #3599

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

waitingsong
Copy link
Member

检查 process.env.MIDWAY_HTTP_PORT 变量是否设置。

有时卡着一直启动不了,不出现 ➜ Local: http://127.0.0.1:7001/ 的信息,也没有日志可以判断。

@@ -21,9 +21,14 @@ const { join } = require('path');
...args,
});

const port = process.env.MIDWAY_HTTP_PORT
if (! port) {
Copy link
Member

Choose a reason for hiding this comment

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

这个不一定有,比如纯 grpc 服务就没有 http port 了

Copy link
Member Author

Choose a reason for hiding this comment

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

那要不要改成输出一个日志提示没有值

Copy link
Member

Choose a reason for hiding this comment

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

也有点诡异,目的是为了解决启动卡住的问题吧

Copy link
Member Author

Choose a reason for hiding this comment

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

是的,挺奇怪的,相同的配置参数 ( run dev ) , 命令行启动正常。而在 vscode 的 F5 启动就卡住,排查下来就是没有配置端口导致的。

Copy link
Member

Choose a reason for hiding this comment

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

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (7649dff) 84.45% compared to head (42aac61) 84.37%.
Report is 3 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3599      +/-   ##
==========================================
- Coverage   84.45%   84.37%   -0.09%     
==========================================
  Files         491      491              
  Lines       46730    46730              
  Branches     5584     5566      -18     
==========================================
- Hits        39468    39427      -41     
- Misses       7221     7262      +41     
  Partials       41       41              

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

@czy88840616 czy88840616 added the status: Holding Same features may be hold, and implements layer. label Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: Holding Same features may be hold, and implements layer.
Development

Successfully merging this pull request may close these issues.

None yet

3 participants