Skip to content

Commit

Permalink
add .env to .gitignore and create Supabase client
Browse files Browse the repository at this point in the history
  • Loading branch information
christophertorres1 committed Oct 4, 2024
1 parent c51d542 commit 97b0490
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ yarn-error.*
*.pem

# local env files
.env
.env*.local

# typescript
Expand Down
9 changes: 9 additions & 0 deletions src/supabase/client.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import 'react-native-url-polyfill/auto';
import { createClient } from '@supabase/supabase-js';

// Environment variables pulled from your .env file
const SUPABASE_URL = process.env.EXPO_PUBLIC_SUPABASE_URL!;
const SUPABASE_ANON_KEY = process.env.EXPO_PUBLIC_SUPABASE_ANON_KEY!;

// Create a single Supabase client instance
export const supabase = createClient(SUPABASE_URL, SUPABASE_ANON_KEY);

0 comments on commit 97b0490

Please sign in to comment.