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
http://localhost:8080/sockjs-node errors #5
Comments
I usually only get the socket error when the devserver is not running or has tripped on an exception, so I am not sure I fully understand the issue. Here is the setup I use: Vue backend calls go to If this setup doesn't work for you, you can try adding host up ( Dev Server config
For consistency's sake, maybe we can change settings to have all on the same host We could serve Django on localhost by using Does this answer your question? |
You can modify your package.json to select a specific hostname or port. |
Was just typing up this response when I saw yours come in. Thanks again for your help. Looks like I got it working. I added "-- host 0.0.0.0" to the line in package.json that specifies the "serve" script and now it it is listening on both localhost and my host's IP. I also had to add "disableHostCheck: true" to the devServer vue.config.js to resolve "Invalid Host header" errors. |
|
First off, thanks for the great template. The browser console reports errors trying to connect to http://localhost:8080/sockjs-node/..., because the dev server isn't listening on localhost but instead the host IP. How do you change the development server to listen on localhost as well? I tried setting "host:'localhost'" in vue.config.js but it is ignored. Alternately, how do you point those sockjs-node calls to the hostname rather than localhost?
The text was updated successfully, but these errors were encountered: