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

Add support for ipv6 host #650

Merged
merged 1 commit into from
Aug 18, 2023
Merged

Add support for ipv6 host #650

merged 1 commit into from
Aug 18, 2023

Conversation

jspspike
Copy link

@jspspike jspspike commented Aug 9, 2023

Allows host to be ipv6 and defaults to localhost for accessibleHost

@jspspike jspspike requested a review from mrbbot August 9, 2023 04:42
@changeset-bot
Copy link

changeset-bot bot commented Aug 9, 2023

⚠️ No Changeset found

Latest commit: d61b3f7

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.

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

packages/miniflare/src/index.ts Outdated Show resolved Hide resolved
packages/miniflare/src/index.ts Outdated Show resolved Hide resolved
@jspspike jspspike force-pushed the jspspike/localhost branch 3 times, most recently from fd6654c to 04ea804 Compare August 10, 2023 17:34
@jspspike jspspike changed the title Switch default to localhost instead of 127.0.0.1 Add support for ipv6 host Aug 10, 2023
@jspspike jspspike requested a review from mrbbot August 10, 2023 17:37
@jspspike
Copy link
Author

Small change but do you think we should maybe change this to host or something else? Just to let the user know that it's listening on more than 127.0.0.1?

@jspspike jspspike requested a review from mrbbot August 11, 2023 16:35
Copy link
Contributor

@mrbbot mrbbot left a comment

Choose a reason for hiding this comment

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

maybe change this to host or something else?

Hmmm, we could do. The reason it's accessible host is so that when IDE's autolink it in integrated terminals, it goes straight to the browser. Miniflare 2 solved this by logging the listening host first, then all IPs this was accessible on:

log.info(`Listening on ${host ?? ""}:${usedPort}`);
for (const accessibleHost of accessibleHosts) {
log.info(`- ${protocol}://${accessibleHost}:${usedPort}`);
}

Maybe we should do something like that?

packages/miniflare/src/index.ts Outdated Show resolved Hide resolved
packages/miniflare/src/index.ts Outdated Show resolved Hide resolved
@jspspike jspspike force-pushed the jspspike/localhost branch 3 times, most recently from 3330ce1 to f37aad7 Compare August 14, 2023 15:34
@jspspike jspspike force-pushed the jspspike/localhost branch 2 times, most recently from 23351bf to 70394c7 Compare August 17, 2023 22:04
@jspspike jspspike merged commit 0b7a470 into tre Aug 18, 2023
8 checks passed
@jspspike jspspike deleted the jspspike/localhost branch August 18, 2023 16:09
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.

2 participants