aboutsummaryrefslogtreecommitdiff
path: root/modern/src/setupProxy.js
blob: c16655c8c68a5b18e9b1edc9de100c32b3870170 (plain)
1
2
3
4
5
6
const proxy = require('http-proxy-middleware');

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