forked from Navy.gif/webserver-framework-frontend
11 lines
254 B
JavaScript
11 lines
254 B
JavaScript
const { createProxyMiddleware } = require('http-proxy-middleware');
|
|
|
|
module.exports = (app) => {
|
|
app.use(
|
|
'/api',
|
|
createProxyMiddleware({
|
|
target: 'http://localhost:4000',
|
|
changeOrigin: true
|
|
})
|
|
);
|
|
}; |