setupProxy.js 212 B

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