If I run run-s build api, Vue is built for production, served up on localhost:3333, and the connection to the api works flawlessly.
But if I run run-s serve api, Vue is served up for dev on localhost:8080, and I get this error when trying to hit the api via the devServer proxy:
Proxy error: Could not proxy request /api/ from localhost:8080 to http://localhost:3333 (ECONNREFUSED).
I've searched around for answers, and I've found a handful, but they've all been suggested by people with the caveat "it works, but I'm not sure why", and none of them work for me.
Here are the changes I've tried already:
I've started a project based on this template, and I'm struggling with the devServer proxy. Here's the relevant config:
package.json
vue.config.js
my issue
I've searched around for answers, and I've found a handful, but they've all been suggested by people with the caveat "it works, but I'm not sure why", and none of them work for me. Here are the changes I've tried already:
Any help would be greatly appreciated, thanks! (Originally posted on Spectrum.)