awesome-compose/react-express-mysql/frontend/src/setupProxy.js

12 lines
235 B
JavaScript
Raw Normal View History

const { createProxyMiddleware } = require("http-proxy-middleware");
module.exports = function(app) {
app.use(
"/api",
createProxyMiddleware({
target: "http://backend",
pathRewrite: { "^/api": "" }
})
);
};