-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsupabase.js
More file actions
17 lines (13 loc) · 752 Bytes
/
Copy pathsupabase.js
File metadata and controls
17 lines (13 loc) · 752 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import { createClient } from 'https://cdn.jsdelivr.net/npm/@supabase/supabase-js@2/+esm';
// Replace both placeholders with values from Supabase Project Settings > API.
const SUPABASE_URL = 'https://mfyleprybkpdsqviovxm.supabase.co';
const SUPABASE_PUBLISHABLE_KEY = 'sb_publishable_-NzbGRWJRsb689T_UDG-gQ_flUbGXlg';
export const isConfigured =
!SUPABASE_URL.startsWith('YOUR_') && !SUPABASE_PUBLISHABLE_KEY.startsWith('YOUR_');
export const supabase = createClient(
isConfigured ? SUPABASE_URL : 'https://placeholder.supabase.co',
isConfigured ? SUPABASE_PUBLISHABLE_KEY : 'placeholder-publishable-key',
);
export function configurationMessage() {
return '请先在 js/supabase.js 中填写 Supabase Project URL 和 publishable key。';
}