Skip to content

Commit 0c9cd80

Browse files
committed
fix: added logging of database url being connected to
1 parent 3181e8e commit 0c9cd80

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

src/hooks.server.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const redirects: Handle = async ({ event, resolve }) => {
2121
}
2222

2323
const supabase: Handle = async ({ event, resolve }) => {
24+
console.log("└⚡Server connecting to database: ", LOCAL_SUPABASE_URL)
2425
event.locals.supabaseServer = createServerClient(LOCAL_SUPABASE_URL, PUBLIC_SUPABASE_ANON_KEY, {
2526
cookies: {
2627
getAll: () => event.cookies.getAll(),

src/lib/server/supabase.server.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { formatError } from "$lib/utils"
44
import { type SupabaseClient, createClient, type Provider } from "@supabase/supabase-js"
55
import { error, redirect } from "@sveltejs/kit"
66

7+
console.log("└⚡Server connecting to admin database: ", LOCAL_SUPABASE_URL)
78
export const supabaseAdmin = createClient<Database>(LOCAL_SUPABASE_URL, SUPABASE_SERVICE_KEY, {
89
auth: { autoRefreshToken: true, persistSession: false }
910
})

src/routes/+layout.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import type { Session, User } from "@supabase/supabase-js"
55
export const load = async ({ data, depends, fetch }) => {
66
depends("supabase:auth")
77

8+
console.log("└⚡Client connecting to database: ", PUBLIC_SUPABASE_URL)
89
const supabaseClient = isBrowser()
910
? createBrowserClient(PUBLIC_SUPABASE_URL, PUBLIC_SUPABASE_ANON_KEY, {
1011
global: { fetch }

0 commit comments

Comments
 (0)