const { createProxyMiddleware } = require('http-proxy-middleware');

module.exports = function(app) {
  const base = process.env.PUBLIC_URL;
  console.log(`http-proxy-middleware ${base}`);
  app.use(createProxyMiddleware(
    `${base}/api/v1/groups/ws`, {
      ws: true,
      target: 'http://localhost:11141',
      changeOrigin: true,
  }));
};
