move to webapp
This commit is contained in:
11
src/supabase/server.ts
Normal file
11
src/supabase/server.ts
Normal file
@ -0,0 +1,11 @@
|
||||
import getConfig from "next/config";
|
||||
import { createClient } from "@supabase/supabase-js";
|
||||
|
||||
const { publicRuntimeConfig, serverRuntimeConfig } = getConfig();
|
||||
|
||||
const { supabase: { url } } = publicRuntimeConfig;
|
||||
const { supabase: { roleKey } } = serverRuntimeConfig;
|
||||
|
||||
const supabase = createClient(url, roleKey);
|
||||
|
||||
export default supabase;
|
Reference in New Issue
Block a user