mirror of
https://github.com/Since-3/since3-portal.git
synced 2026-10-12 21:41:16 +00:00
added supabase
This commit is contained in:
parent
a228d2c389
commit
75f8b0bc9d
4 changed files with 154 additions and 0 deletions
9
lib/supabase/client.ts
Normal file
9
lib/supabase/client.ts
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import { createBrowserClient } from "@supabase/ssr"
|
||||
|
||||
|
||||
export function createClient() {
|
||||
return createBrowserClient(
|
||||
process.env.NEXT_PUBLIC_SUPABASE_URL!,
|
||||
process.env.NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY!
|
||||
)
|
||||
}
|
||||
8
lib/supabase/server.ts
Normal file
8
lib/supabase/server.ts
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import { createClient } from "@supabase/supabase-js";
|
||||
|
||||
export function createAdminClient() {
|
||||
return createClient(
|
||||
process.env.NEXT_PUBLIC_SUPABASE_URL!,
|
||||
process.env.SUPABASE_SECRET_KEY!
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue