MCPcopy Create free account
hub / github.com/botbotrobotics/BotBrain / createSupabaseApiClient

Function createSupabaseApiClient

frontend/src/utils/supabase-server.ts:73–87  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

71
72// For API routes - simple client without cookie handling
73export function createSupabaseApiClient() {
74 const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL
75 const supabaseAnonKey = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY
76
77 if (!supabaseUrl || !supabaseAnonKey) {
78 throw new Error(
79 'Missing Supabase environment variables. Please set NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY.'
80 )
81 }
82
83 return createClient<Database>(
84 supabaseUrl,
85 supabaseAnonKey
86 )
87}

Callers

nothing calls this directly

Calls 1

createClientFunction · 0.85

Tested by

no test coverage detected