Spaces:
Running
Running
File size: 387 Bytes
bd28470 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | import { createClient } from "@supabase/supabase-js";
import { getEnv } from "../config/env";
let _client: ReturnType<typeof createClient> | null = null;
export function getSupabaseClient() {
if (!_client) {
const env = getEnv();
_client = createClient(env.SUPABASE_URL, env.SUPABASE_SERVICE_ROLE_KEY, {
auth: { persistSession: false },
});
}
return _client;
}
|