aboutsummaryrefslogtreecommitdiff
path: root/modern/src/setupProxy.js
blob: 3ab7643e1ca1be84ec4fb01ff48d02d686ecb7b4 (plain)
1
2
3
4
5
6
7
8
/* eslint-disable import/no-extraneous-dependencies */

const proxy = require('http-proxy-middleware');

export default (app) => {
  app.use(proxy('/api/socket', { target: `ws://${process.env.REACT_APP_URL_NAME}`, ws: true }));
  app.use(proxy('/api', { target: `http://${process.env.REACT_APP_URL_NAME}` }));
};