Skip to content
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

fix: consider --host flag and HOST env variable #9912

Merged
merged 3 commits into from
Nov 4, 2024

Conversation

thetutlage
Copy link
Contributor

@thetutlage thetutlage commented Nov 4, 2024

Fixes: FRMW-2756

After this PR we consider both the HOST environment variable and the --host CLI flag for starting the server on the specified host.

Examples

npx medusa develop --host=0.0.0.0 --port=3333
# Runs on -> http://0.0.0.0:3333

HOST=0.0.0.0 PORT=3333 npx medusa develop
# Runs on -> http://0.0.0.0:3333

HOST=0.0.0.0 PORT=3333 npx medusa develop --port=3000
# Runs on -> http://0.0.0.0:3000 (--port flag has priority over the environment variable)

@thetutlage thetutlage requested a review from a team as a code owner November 4, 2024 07:47
Copy link

vercel bot commented Nov 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
medusa-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 4, 2024 9:10am
6 Skipped Deployments
Name Status Preview Comments Updated (UTC)
api-reference ⬜️ Ignored (Inspect) Nov 4, 2024 9:10am
api-reference-v2 ⬜️ Ignored (Inspect) Visit Preview Nov 4, 2024 9:10am
docs-ui ⬜️ Ignored (Inspect) Visit Preview Nov 4, 2024 9:10am
docs-v2 ⬜️ Ignored (Inspect) Visit Preview Nov 4, 2024 9:10am
medusa-docs ⬜️ Ignored (Inspect) Visit Preview Nov 4, 2024 9:10am
resources-docs ⬜️ Ignored (Inspect) Visit Preview Nov 4, 2024 9:10am

Copy link

changeset-bot bot commented Nov 4, 2024

⚠️ No Changeset found

Latest commit: b8d60d1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@thetutlage thetutlage marked this pull request as draft November 4, 2024 07:48
@thetutlage thetutlage requested review from adrien2p and removed request for mrnbpt November 4, 2024 07:48
@thetutlage thetutlage merged commit 300ef8d into develop Nov 4, 2024
23 checks passed
@thetutlage thetutlage deleted the fix/consider-host-modifications branch November 4, 2024 09:27
kodiakhq bot pushed a commit that referenced this pull request Nov 6, 2024
Fixes bug introduced by #9912

By default the Node.js server listens on the `0.0.0.0` host. However, the related PR changes the host to `localhost` and hence resulted in an unwanted breaking change. This PR reverts the default value assignment and let Node.js decide the host when not explicitly specified.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants