setupProxy.js 233 B

12345678910111213
  1. "use strict";
  2. var proxy = require('http-proxy-middleware');
  3. module.exports = function (app) {
  4. app.use(proxy("/api", {
  5. "target": "http://localhost:5000/",
  6. "ws": true,
  7. "pathRewrite": {
  8. "^/api": "/"
  9. }
  10. }));
  11. };