awesome-compose/react-java-mysql/frontend/src/setupProxy.js
Jérémie Drouet 70be09e941 react-java-mysql: use create-react-app for frontend
Signed-off-by: Jérémie Drouet <jeremie.drouet@gmail.com>
2020-03-23 14:05:33 +01:00

12 lines
240 B
JavaScript

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