Skip to content

Instantly share code, notes, and snippets.

@z3tsubouou
Created December 20, 2022 17:48
Show Gist options
  • Save z3tsubouou/fee801ddae72c6287f93d515fca35b10 to your computer and use it in GitHub Desktop.
Save z3tsubouou/fee801ddae72c6287f93d515fca35b10 to your computer and use it in GitHub Desktop.
Create supabase client and use vite environment variable.
import { createClient } from '@supabase/supabase-js'
const supabaseUrl = import.meta.env.VITE_SUPABASE_URL
const supabaseAnonKey = import.meta.env.VITE_SUPABASE_ANON_KEY
export const supabase = createClient(supabaseUrl, supabaseAnonKey)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment