diff --git a/.env.example b/.env.example new file mode 100644 index 000000000..610cf681d --- /dev/null +++ b/.env.example @@ -0,0 +1,5 @@ +HEYGEN_API_KEY="" +NEXT_PUBLIC_BASE_API_URL=https://api.heygen.com +SUPABASE_URL="" +SUPABASE_SERVICE_ROLE_KEY="" +SUPABASE_ANON_KEY="" diff --git a/app/lib/supabase.ts b/app/lib/supabase.ts new file mode 100644 index 000000000..88a1152fa --- /dev/null +++ b/app/lib/supabase.ts @@ -0,0 +1,8 @@ +import { createClient } from "@supabase/supabase-js"; + +const key = + process.env.SUPABASE_SERVICE_ROLE_KEY ?? process.env.SUPABASE_ANON_KEY; + +if (!key) throw new Error("Missing Supabase key"); + +export const supabase = createClient(process.env.SUPABASE_URL!, key);