webserver-framework-frontend/src/setupProxy.js
2022-11-17 14:33:59 +02:00

11 lines
254 B
JavaScript

const { createProxyMiddleware } = require('http-proxy-middleware');
module.exports = (app) => {
app.use(
'/api',
createProxyMiddleware({
target: 'http://localhost:4000',
changeOrigin: true
})
);
};