You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

7 lines
266 B

4 years ago
  1. const proxy = require("http-proxy-middleware");
  2. let config = {url: "http://127.0.0.1:9000/"};
  3. module.exports = function(app) {
  4. app.use(proxy('/api/ws', { target: config.url, ws: true }));
  5. app.use(proxy('/api', { target: config.url, ws: false }));
  6. };