initial
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
function required(name: string, value: string | undefined): string {
|
||||
if (!value || value.length === 0) {
|
||||
throw new Error(
|
||||
`Missing env var ${name}. Copy apps/desktop/.env.example to apps/desktop/.env and fill it.`,
|
||||
);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
export const env = {
|
||||
supabaseUrl: required('VITE_SUPABASE_URL', import.meta.env.VITE_SUPABASE_URL),
|
||||
supabaseAnonKey: required('VITE_SUPABASE_ANON_KEY', import.meta.env.VITE_SUPABASE_ANON_KEY),
|
||||
authRedirectUrl: required('VITE_AUTH_REDIRECT_URL', import.meta.env.VITE_AUTH_REDIRECT_URL),
|
||||
};
|
||||
Reference in New Issue
Block a user