Spaces:
Running
Running
Download src/supabase.js from Tataaicoltd/api: direct link, hf CLI and curl.
- Browser
- Download file 560 Bytes
-
https://huggingface.co/spaces/Tataaicoltd/api/resolve/main/src/supabase.js
- Command line
-
hf download hf://spaces/Tataaicoltd/api/src/supabase.js
-
curl -L -o supabase.js https://huggingface.co/spaces/Tataaicoltd/api/resolve/main/src/supabase.js
560 Bytes
| import { createClient } from '@supabase/supabase-js'; | |
| import dotenv from 'dotenv'; | |
| dotenv.config(); | |
| const { SUPABASE_URL, SUPABASE_KEY } = process.env; | |
| if (!SUPABASE_URL || !SUPABASE_KEY) { | |
| console.error('Missing SUPABASE_URL or SUPABASE_KEY in environment (.env).'); | |
| process.exit(1); | |
| } | |
| // Service-role client — server-side only. Never expose the key to the browser. | |
| export const supabase = createClient(SUPABASE_URL, SUPABASE_KEY, { | |
| auth: { persistSession: false } | |
| }); | |
| export const STORAGE_BUCKET = process.env.STORAGE_BUCKET || 'ticket-images'; | |