-
-
Notifications
You must be signed in to change notification settings - Fork 865
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
Keep the default development Host (localhost) unopinionated or configurable via razzle.config.js #713
Comments
Yeah this would be good to figure out. However, it needs an explicit host because Razzle needs 2 ports during development mode. Using just a slash would point to the wrong place. |
Got it, can't disagree this would be hard to get right because of the 2 ports. Can you elaborate a bit why there is a need to set up 2 ports? Would it break everything (eg. needs a rewrite) if there was just 1 port? |
Razzle would need to be runtime dependency or middleware, right now it’s build time. One port is for your server another port is for the webpack client bundle. |
This was my attempt at a fix: #740 FWIW, I've been using that patch for a couple months now and haven't had any trouble. |
Hola! So here's the deal, between open source and my day job and life and what not, I have a lot to manage, so I use a GitHub bot to automate a few things here and there. This particular GitHub bot is going to mark this as stale because it has not had recent activity for a while. It will be closed if no further activity occurs in a few days. Do not take this personally--seriously--this is a completely automated action. If this is a mistake, just make a comment, DM me, send a carrier pidgeon, or a smoke signal. |
ProBot automatically closed this due to inactivity. Holler if this is a mistake, and we'll re-open it. |
Just wondering if host has ever been made configurable? I ask because I am trying to create a docker container to run my razzle app. This requires me using the docker-machine ip 192.168.99.100 |
Mostly. There are still some issues. #740 CLIENT_PUBLIC_PATH was merged, and Razzle v2 introduced Runtime environment variables, which both helped a lot. There's a new issue in v3 with the socket that the client is trying to connect to. It's using localhost instead of CLIENT_PUBLIC_PATH. #581 was never accepted (v3 version #1020) which I think would go a long way toward making these issues go away. It introduces a client port var instead of calculating which port the client should connect to in different places. |
Hi, first of all would like to say that razzle is a great tool.
The readme says about the
publicPath
option in development that it isHowever, by doing this the development server url becomes not so much configurable and we end up encountering issues like these #263, #710, #610. I'm aware that you can change the default host by adding
HOST= 192.168.1.2
to the.env
file or by prependingHOST=192.168.1.2
to therazzle start
as described here as a solution. But what if the IP changes everytime? What if you use a service like ngrok which generates a url some unique ids every time you start the server? Then you have to change the HOST almost everytime or it would just break.Imo, this should be either unopinionated and just stay
/
or make it configurable.The text was updated successfully, but these errors were encountered: