Allow specifying IP address for Express server to listen on #2320
codycraven
started this conversation in
Proposals
Replies: 1 comment 6 replies
-
Thanks for taking the time to open this. Will it help at all that we're publishing a change today to show both the |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Developers have a variety of environments that may make routing challenging (running code in VM, containers, WSL2, etc). A fairly consistent solution to these environment specific challenges is to attach listeners to IP address 0.0.0.0 instead of a specific IP (which may only be accessible in a specific scope).
To lower the barrier of entry for these developers, an environment variable could be added to specify the IP address to listen (just like the PORT can be specified).
Example:
remix/packages/remix-dev/cli/commands.ts
Lines 185 to 195 in c4dd5f1
HOST=0.0.0.0 npm run dev
Note, if it's a good idea to implement this, it should probably be done for remix-serve/cli.ts as well.
I'm happy to open a PR if this is wanted.
Beta Was this translation helpful? Give feedback.
All reactions