-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Support custom basepath in HotROD #1894
Conversation
Signed-off-by: Abhilash Gnan <abhilashgnan@gmail.com>
Signed-off-by: Abhilash Gnan <abhilashgnan@gmail.com>
Signed-off-by: Abhilash Gnan <abhilashgnan@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #1894 +/- ##
==========================================
- Coverage 98.45% 96.97% -1.49%
==========================================
Files 198 203 +5
Lines 9740 10062 +322
==========================================
+ Hits 9590 9758 +168
- Misses 114 266 +152
- Partials 36 38 +2
Continue to review full report at Codecov.
|
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.
Looks pretty good, I have a few comments/questions about simplifying the implementation and making it a bit more robust.
@albertteoh Thanks for the review! I like your idea about using |
Signed-off-by: Abhilash Gnan <abhilashgnan@gmail.com>
Hi @pavolloffay @yurishkuro! could you please review this? This is a simple change :) |
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.
LGTM, thanks @jan25!
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.
LGTM just one minor comment
examples/hotrod/cmd/root.go
Outdated
@@ -73,6 +75,9 @@ func init() { | |||
RootCmd.PersistentFlags().IntVarP(&frontendPort, "frontend-service-port", "f", 8080, "Port for frontend service") | |||
RootCmd.PersistentFlags().IntVarP(&routePort, "route-service-port", "r", 8083, "Port for routing service") | |||
|
|||
// Flag for serving frontend at custom basepath url | |||
RootCmd.PersistentFlags().StringVarP(&basepath, "basepath", "b", "", "Basepath for frontend service") |
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.
Could you please add a default value /
it makes the help command more self explanatory.
-b, --basepath string Basepath for frontend service (default "/")
instead of
-b, --basepath string Basepath for frontend service
Signed-off-by: Abhilash Gnan <abhilashgnan@gmail.com>
Which problem is this PR solving?
localhost:8080/hotrod
Short description of the changes
basepath
argument tocmd/root.go
TODO