2020-02-06 19:04:18 -08:00
|
|
|
const proxy = require('http-proxy-middleware');
|
|
|
|
|
2020-02-24 19:29:11 +00:00
|
|
|
module.exports = function (app) {
|
2020-02-06 19:04:18 -08:00
|
|
|
app.use(
|
|
|
|
'/api',
|
|
|
|
proxy({
|
|
|
|
target: 'http://localhost:8080',
|
|
|
|
changeOrigin: true
|
|
|
|
})
|
|
|
|
);
|
2020-02-24 19:29:11 +00:00
|
|
|
|
|
|
|
app.use(
|
|
|
|
'/static/examples',
|
|
|
|
proxy({
|
|
|
|
target: 'http://localhost:8080',
|
|
|
|
changeOrigin: true
|
|
|
|
})
|
|
|
|
);
|
2020-02-06 19:04:18 -08:00
|
|
|
};
|