8 lines
266 B
JavaScript
8 lines
266 B
JavaScript
const proxy = require("http-proxy-middleware");
|
|
|
|
let config = {url: "http://127.0.0.1:9000/"};
|
|
|
|
module.exports = function(app) {
|
|
app.use(proxy('/api/ws', { target: config.url, ws: true }));
|
|
app.use(proxy('/api', { target: config.url, ws: false }));
|
|
}; |