-
Notifications
You must be signed in to change notification settings - Fork 574
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
base: main
Are you sure you want to change the base?
Conversation
@@ -21,9 +21,14 @@ const { join } = require('path'); | |||
...args, | |||
}); | |||
|
|||
const port = process.env.MIDWAY_HTTP_PORT | |||
if (! port) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个不一定有,比如纯 grpc 服务就没有 http port 了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
那要不要改成输出一个日志提示没有值
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
也有点诡异,目的是为了解决启动卡住的问题吧
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是的,挺奇怪的,相同的配置参数 ( run dev ) , 命令行启动正常。而在 vscode 的 F5 启动就卡住,排查下来就是没有配置端口导致的。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ 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. |
检查
process.env.MIDWAY_HTTP_PORT
变量是否设置。有时卡着一直启动不了,不出现
➜ Local: http://127.0.0.1:7001/
的信息,也没有日志可以判断。