Skip to content
Snippets Groups Projects
config.js 398 B
Newer Older
  • Learn to ignore specific revisions
  • class Config {
      constructor () {
        this.BACKEND_URL = process.env.BACKEND_URL
    
    Eliot Berriot's avatar
    Eliot Berriot committed
        if (this.BACKEND_URL === '/') {
          this.BACKEND_URL = window.location.protocol + '//' + window.location.hostname + ':' + window.location.port
        }
    
        if (!this.BACKEND_URL.endsWith('/')) {
          this.BACKEND_URL += '/'
        }
    
        this.API_URL = this.BACKEND_URL + 'api/v1/'