github.com/martinohmann/rfoutlet@v1.2.1-0.20220707195255-8a66aa411105/web/src/config.js (about)

     1  export default {
     2    project: {
     3      name: "rfoutlet",
     4      url: 'https://github.com/martinohmann/rfoutlet',
     5    },
     6    ws: {
     7      // While development proxying of websocket connections does not work
     8      // properly, so we have to override the url here conditionally.
     9      url: (() => {
    10        const l = window.location;
    11  
    12        if (!process.env.NODE_ENV || process.env.NODE_ENV === 'development') {
    13          return `ws://${l.hostname}:3333/ws`
    14        }
    15  
    16        return `ws://${l.host}/ws`;
    17      })(),
    18    }
    19  }