Spaces:
Paused
Paused
Download lib/supabaseClient.js from Adhyasta/gcs-backend-server: direct link, hf CLI and curl.
- Browser
- Download file 732 Bytes
-
https://huggingface.co/spaces/Adhyasta/gcs-backend-server/resolve/main/lib/supabaseClient.js
- Command line
-
hf download hf://spaces/Adhyasta/gcs-backend-server/lib/supabaseClient.js
-
curl -L -o supabaseClient.js https://huggingface.co/spaces/Adhyasta/gcs-backend-server/resolve/main/lib/supabaseClient.js
732 Bytes
| /** | |
| * Supabase Client Initialization for GCS Backend | |
| * Connects to Supabase cloud database and storage | |
| */ | |
| const { createClient } = require('@supabase/supabase-js') | |
| require('dotenv').config() | |
| const supabaseUrl = process.env.SUPABASE_URL | |
| const supabaseKey = process.env.SUPABASE_ANON_KEY | |
| if (!supabaseUrl || !supabaseKey) { | |
| console.warn('[SUPABASE] ⚠️ Warning: Supabase credentials not found in environment variables') | |
| console.warn('[SUPABASE] Please set SUPABASE_URL and SUPABASE_ANON_KEY in .env file') | |
| } | |
| const supabase = createClient(supabaseUrl, supabaseKey, { | |
| auth: { | |
| persistSession: false, | |
| autoRefreshToken: false | |
| } | |
| }) | |
| console.log('[SUPABASE] ✓ Client initialized') | |
| module.exports = { supabase } | |