feat(dev): support configurable ports and hosts for multi-workspace and cloudtop - #983
Merged
Merged
Conversation
…nd cloudtop Support configuring ports and hosts via environment variables for KHI development servers and test runners. - Makefile: allow overriding WEB_HOST, WEB_PORT, BACKEND_HOST, BACKEND_PORT, STORYBOOK_HOST, STORYBOOK_PORT, and KARMA_PORT. Add --allowed-hosts flag automatically when WEB_HOST is 0.0.0.0. - Angular proxy: forward to BACKEND_HOST and BACKEND_PORT, normalizing 0.0.0.0 to 127.0.0.1 for HTTP proxy target. - Karma: configure port from KARMA_PORT, bind to 127.0.0.1, and set --remote-debugging-port=0 to avoid debugging port collisions in headless Chrome.
Contributor
There was a problem hiding this comment.
Code Review
This pull request parameterizes the host and port configurations for the frontend, backend, Storybook, and Karma servers across Makefiles, VS Code configurations, and web configuration files. The review feedback correctly points out two issues: the VS Code task regex needs to match 127.0.0.1 in addition to localhost to prevent tasks from hanging, and the --allowed-hosts flag in build.mk must be provided with a value (like all) when WEB_HOST is 0.0.0.0 to prevent ng serve from failing.
Merged
via the queue into
GoogleCloudPlatform:main
with commit Sep 11, 2026
479d42c
17 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Support configuring ports and hosts via environment variables for KHI development servers and test runners.
WEB_HOST,WEB_PORT,BACKEND_HOST,BACKEND_PORT,STORYBOOK_HOST,STORYBOOK_PORT, andKARMA_PORT. Automatically append--allowed-hostswhenWEB_HOSTis set to0.0.0.0.BACKEND_HOSTandBACKEND_PORTwith fallback toHOSTandPORT. Automatically map0.0.0.0to127.0.0.1for the HTTP proxy target.KARMA_PORT, bind to127.0.0.1, and specify--remote-debugging-port=0in headless Chrome flags to prevent debugging port conflicts across multiple workspaces.