Initial commit: monorepo Naturcalabacera reservas (apps/api + apps/web + packages/shared)
This commit is contained in:
20
src/lib/supabase.ts
Normal file
20
src/lib/supabase.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { createClient } from '@supabase/supabase-js';
|
||||
|
||||
const supabaseUrl = import.meta.env.VITE_SUPABASE_URL;
|
||||
const supabaseKey = import.meta.env.VITE_SUPABASE_ANON_KEY;
|
||||
|
||||
if (!supabaseUrl || !supabaseKey) {
|
||||
console.error('CRITICAL: Missing Supabase Environment Variables in .env');
|
||||
console.error('VITE_SUPABASE_URL:', supabaseUrl);
|
||||
// Don't throw, just warn to keep app alive for debugging
|
||||
}
|
||||
|
||||
export const supabase = createClient(
|
||||
supabaseUrl || 'https://placeholder.supabase.co',
|
||||
supabaseKey || 'placeholder-key',
|
||||
{
|
||||
db: {
|
||||
schema: import.meta.env.VITE_SUPABASE_SCHEMA || 'public'
|
||||
}
|
||||
}
|
||||
);
|
||||
Reference in New Issue
Block a user