proxy vue code example
Example: proxy in vuejs
devServer proxy(in vue.config.js)
create vue.config.js
module.exports = {
devServer: {
proxy: {
"^/api": {
target: "http://localhost:5000",
changeOrigin: true,
logLevel: "debug",
pathRewrite: { "^/api": "/" },
},
},
},
};
restart frontend server