awesome-compose/react-express-mysql/frontend/src/setupProxy.js
Jérémie Drouet b58a42015d react-express-mysql: use create-react-app template
Signed-off-by: Jérémie Drouet <jeremie.drouet@gmail.com>
2020-03-23 13:24:37 +01:00

12 lines
235 B
JavaScript

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