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

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

module.exports = (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}` }));
};