0
If your backend works on let’s say localhost:80, and your vue app works on localhost:8080, you can proxy specific requests to backend prefixing routes so that dev server understands what requests to proxy
// vue.config.js
module.exports = {
devServer: {
port: 8080,
proxy: {
"/api": {
target: "http://localhost:80"
}
}
}
}
Now requests to /api/first-vue and /api/second-vue will be proxied to 80th port
- [Vuejs]-Wrap a Vue.js Firebase-Object into onAuthStateChanged handler?
- [Vuejs]-Data not updating from Event Bus
Source:stackexchange.com