I'm working on some boilerplate code to get a VueJS frontend working with a Go-powered backend (using gorilla/mux
for a router):
Currently, I seem to have everything working for the most part. I'm serving a static HTML file via Go and rendering Vue stuff with it that's being bundled with webpack (webpack-dev-server currently, not a physical bundle), and I'm having a weird issue:
In my browser, Firefox keeps telling me the following:
Firefox can’t establish a connection to the server at http://localhost:3000/__webpack_hmr.
Yet, when I change Vue components and save them, they're auto-refreshing in the browser as I would expect. I'm really confused, I guess, I don't know why this is happening.
I've tried changing the port that my Go server operates on, and it always seems to fail connection at http://localhost:<Go Server Port>/__webpack_hmr
.
Any thoughts? Maybe there's a step I'm missing or the setup is more complicated than I thought it was.
Do I need to be running an Express server and using the webpack-based Middleware to fix this error? If so, that sounds silly if I'm using Go for the backend (why would I run two servers?). Am I doing something wrong?
As for the Go side of things, I've tried both running the Go server on a different port and having the webpack server run on different ports and such, but it always fails to connect at http://localhost:<Go Server Port>/__webpack_hmr
.
Maybe this is more complicated to set up than I thought it was, or since it seems to be "working", I can safely ignore this error? I dunno.