alpha
Login
or
Join now
atpota.to
/
cred.blue
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
This repository has no description
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
fix supabase
author
damedotblog
date
1 year ago
(Feb 19, 2025, 9:44 PM -0500)
commit
a51877ea
a51877ea14ef64d3fa417da2688291da2a274737
parent
d2c586ce
d2c586ce6a59889c297648a77c75908629f1ef24
+6
-2
1 changed file
Expand all
Collapse all
Unified
Split
src
lib
supabase.js
+6
-2
src/lib/supabase.js
Reviewed
···
1
1
import { createClient } from '@supabase/supabase-js'
2
2
3
3
-
const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL
4
4
-
const supabaseAnonKey = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY
3
3
+
const supabaseUrl = process.env.SUPABASE_URL || process.env.NEXT_PUBLIC_SUPABASE_URL
4
4
+
const supabaseAnonKey = process.env.SUPABASE_ANON_KEY || process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY
5
5
+
6
6
+
if (!supabaseUrl || !supabaseAnonKey) {
7
7
+
throw new Error(`Missing environment variables: ${!supabaseUrl ? 'SUPABASE_URL' : ''} ${!supabaseAnonKey ? 'SUPABASE_ANON_KEY' : ''}`)
8
8
+
}
5
9
6
10
export const supabase = createClient(supabaseUrl, supabaseAnonKey)