-
Notifications
You must be signed in to change notification settings - Fork 47
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
reload-client.js via /reload/reload.js fails when Node server is listening on port 80 #126
Comments
What error does it give? |
Very nice catch. Feel free to send PR otherwise we will get this patched soon |
So what is the temporary solution until the fix is released? Should I run my server on different port? |
Answering to my previous question: Yes, just run the code on port 3000 or something, but not on 80. |
Should I add a note on README.md explaining this? I can remove it when the fix is released. |
@meszaros-lajos-gyorgy yes for now. I will get the fix up now. @Yamboy1 that should answer your question too. |
@meszaros-lajos-gyorgy should be all set. Published to npm |
Thank you! |
I'm still getting this error. Running the server on port 3000 ...
const server = http.createServer(app);
reload(app);
server.listen(3000, () => console.log("Example app listening on port 3000!")); and I have copied the client javascript <script src="/src/js/reload-client.js" ></script>
|
@johhansantana you are not including your JS script tag correctly. It should look like this |
In the latest stable build of Chrome,
window.location.origin
doesn't include a port number when the port is 80, thus the regex for settingsocketUrl
in reload-client.js fails to match and produces an error when attempting to open a new WebSocket on the client's side.I'm sure this isn't a common issue as most Node development is done on ports other than 80, but it sure gave me a headache for 20 minutes.
The text was updated successfully, but these errors were encountered: