Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: Make server listening port configurable via WAVE_SERVER_PORT mn env var#1029

Merged
bebosudo merged 6 commits into
masterfrom
chiusole/add-listening-port-variable
May 27, 2026
Merged

feat: Make server listening port configurable via WAVE_SERVER_PORT mn env var#1029
bebosudo merged 6 commits into
masterfrom
chiusole/add-listening-port-variable

Conversation

@bebosudo

Copy link
Copy Markdown
Member

Allows users to configure the wave server listening port using the explicit variable WAVE_SERVER_PORT instead of using the implicit micronaut variable MICRONAUT_SERVER_PORT.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates Micronaut configuration so the Wave server listening port can be set explicitly via the WAVE_SERVER_PORT environment variable, rather than relying on Micronaut’s implicit env-var-to-property mapping.

Changes:

  • Make micronaut.server.port resolve from WAVE_SERVER_PORT with a 9090 default.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/main/resources/application.yml
Comment thread src/main/resources/application.yml Outdated
allowAnonymous: true
server:
url: "${WAVE_SERVER_URL:`http://localhost:9090`}"
url: "${WAVE_SERVER_URL:`http://localhost:${WAVE_SERVER_PORT:9090}`}"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not really sure WAVE_SERVER_PORT within backtick is replaced by the variable

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed. That's the reason tests are failing

bebosudo and others added 2 commits May 27, 2026 12:03
…ig test

The nested placeholder `${WAVE_SERVER_PORT:9090}` inside backtick-quoted
default for wave.server.url is not supported by Micronaut, causing
MalformedURLException at runtime. Reverted wave.server.url to its original
static default since it represents the public-facing domain, not the
listening port. Added unit test for WAVE_SERVER_PORT configuration.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
The test environment config (application-test.yml) hardcodes port to -1,
which overrides the placeholder from application.yml. Use
deduceEnvironment(false) to test the main config in isolation.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Starting a full ApplicationContext without the test environment fails
because beans require test-specific config. Instead, only start the
Environment to test property placeholder resolution without instantiating
any application beans.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@bebosudo

bebosudo commented May 27, 2026

Copy link
Copy Markdown
Member Author

Tests passing, I'll merge it

@bebosudo bebosudo merged commit ed40cd9 into master May 27, 2026
3 checks passed
@bebosudo bebosudo deleted the chiusole/add-listening-port-variable branch May 27, 2026 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants