Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 此拉取请求旨在增强 Workerman HTTP 服务器命令的灵活性和可用性。通过引入新的命令行选项和环境变量支持,用户现在可以更精细地控制服务器的监听地址、端口以及是否以守护进程模式运行,从而提升了部署和管理 Workerman 服务的便利性。 Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
| ->addOption('host', null, InputOption::VALUE_OPTIONAL, 'Host to listen on', '127.0.0.1') | ||
| ->addOption('port', null, InputOption::VALUE_OPTIONAL, 'Port to listen on', 8080) | ||
| ->addOption('daemon', 'd', InputOption::VALUE_NONE, 'Run in daemon mode') |
src/Command/WorkermanHttpCommand.php
Outdated
| { | ||
| $worker = new Worker('http://127.0.0.1:8080'); | ||
| $host = $_ENV['WORKERMAN_HTTP_SERVER_HOST'] ?? $input->getOption('host'); | ||
| $port = $_ENV['WORKERMAN_HTTP_SERVER_PORT'] ?? $input->getOption('port'); |
将端口号强制转换为整型,确保Worker构造函数接收正确的参数类型, 避免因环境变量或输入参数类型不一致导致的潜在错误。
更新 README.md 和 README.zh-CN.md 文件中的包名从 tourze/workerman-server-bundle 到 mickeywaugh/workerman-httpserver, 同时更新命令示例以包含默认的主机和端口参数。 更新所有源文件和测试文件中的命名空间从 Tourze 到 Mickeywaugh。 ```
feat(command): 统一环境变量前缀并修复端口类型转换
feat(command): 添加Workerman HTTP命令行选项支持
添加了对HTTP服务器的可配置选项支持,包括主机地址、端口和守护进程模式,
使用户能够自定义服务器监听地址和运行方式。
增加可通过环境变量.env设置主机和端口。