21 lines
643 B
TypeScript
21 lines
643 B
TypeScript
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'
|
|
}
|
|
}
|
|
);
|