web_lib

Common web application libraries
git clone https://radroots.dev/git/web_lib.git
Log | Files | Refs | LICENSE

_env.ts (493B)


      1 const KEYVAL_NAME = import.meta.env.RADROOTS_WEB_KEYVAL_NAME;
      2 if (!KEYVAL_NAME || typeof KEYVAL_NAME !== 'string') throw new Error('Missing env var: RADROOTS_WEB_KEYVAL_NAME');
      3 
      4 const RADROOTS_RELAY = import.meta.env.RADROOTS_WEB_RELAY_URL;
      5 if (!RADROOTS_RELAY || typeof RADROOTS_RELAY !== 'string') throw new Error('Missing env var: RADROOTS_WEB_RELAY_URL');
      6 
      7 const PROD = import.meta.env.MODE === 'production';
      8 
      9 export const _env_lib = {
     10   PROD,
     11   KEYVAL_NAME,
     12   RADROOTS_RELAY,
     13 } as const;