-
Notifications
You must be signed in to change notification settings - Fork 552
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
Add ability to specify server port from cli #2239
base: main
Are you sure you want to change the base?
Add ability to specify server port from cli #2239
Conversation
…er, instead of config or env vars
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2239 +/- ##
===========================================
+ Coverage 30.91% 51.79% +20.87%
===========================================
Files 53 54 +1
Lines 20112 20550 +438
Branches 9755 9540 -215
===========================================
+ Hits 6217 10643 +4426
- Misses 7922 7956 +34
+ Partials 5973 1951 -4022 ☔ View full report in Codecov by Sentry. |
What about configuring it in a configuration file? |
Yeah, I can do that. I'll add that as well |
Alright, just added that in. Currently, this is the order of precedence in the code of where it looks for the port: CLI, config, env var, and lastly, the hardcoded default port of 4226. No particular reason for that order, so that can be changed up if desired. |
@sylvestre, I'm a bit new to the whole process. At this point, do I select "Update branch"? Do I want for someone else to do something? |
… operations (such as a compile request) without having to specify the non-default port every time
I realized I hadn't done anything for commands outside of start or stop. So I added in basic functionality for a client cache (which we can expand to other things), and added tests for that. I also corrected a prior test that was incorrect, I just wasn't thinking properly for that one. I also expanded it to test that a compile request works for a server started on a non-default port. |
It now looks to see if a port number was specified on the command line, and tries to use that before looking at the config file or environment variables
Since --start-server calls InternalStartServer under the hood, I have it starting it with the port number specified as the environment variable, although I can change it to also take it from the cli.
Added tests and updated the readme for usages