-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
168 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,15 @@ | ||
//import { Config } from './config/config'; | ||
import Config from "./config/config" | ||
import config from "./config/config" | ||
import { createClient } from '@supabase/supabase-js' | ||
import config from './config/config' | ||
|
||
// Explicitly type the config | ||
const typedConfig: typeof Config = config; | ||
console.log('NODE_ENV:', config.nodeEnv) | ||
console.log('Supabase URL:', config.supabaseUrl) | ||
console.log('Supabase Key:', config.supabaseAnonKey ? '**hidden**' : 'undefined') | ||
|
||
console.log('NODE_ENV:', typedConfig.nodeEnv) | ||
console.log('Supabase URL:', typedConfig.supabaseUrl) | ||
console.log('Supabase Anon Key:', typedConfig.supabaseAnonKey ? '**hidden**' : 'undefined') | ||
//console.log('Supabase Service Role Key:', typedConfig.supabaseServiceRoleKey ? '**hidden**' : 'undefined') | ||
if (!config.supabaseUrl || !config.supabaseAnonKey) { | ||
throw new Error('Supabase URL or Key is missing. Check your environment variables.') | ||
} | ||
|
||
const supabase = createClient(typedConfig.supabaseUrl, typedConfig.supabaseAnonKey) | ||
//const supabaseAdmin = createClient(typedConfig.supabaseUrl, typedConfig.supabaseServiceRoleKey) | ||
const supabase = createClient(config.supabaseUrl, config.supabaseAnonKey) | ||
|
||
export default supabase | ||
|
||
//export { supabase, supabaseAdmin } | ||
export {supabase} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters