Spaces:
Running
Running
Jimin Huang
commited on
Commit
·
7ad8f09
1
Parent(s):
b72cb23
Change settings
Browse files- src/lib/supabase.js +8 -1
- vite.config.ts +0 -16
src/lib/supabase.js
CHANGED
|
@@ -3,7 +3,14 @@ import { createClient } from '@supabase/supabase-js';
|
|
| 3 |
const url = import.meta.env.VITE_SUPABASE_URL;
|
| 4 |
const anon = import.meta.env.VITE_SUPABASE_ANON_KEY;
|
| 5 |
|
| 6 |
-
if (!url || !anon)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
export const supabase = createClient(url, anon);
|
| 8 |
|
| 9 |
// Helper to run GraphQL queries for features not available in REST
|
|
|
|
| 3 |
const url = import.meta.env.VITE_SUPABASE_URL;
|
| 4 |
const anon = import.meta.env.VITE_SUPABASE_ANON_KEY;
|
| 5 |
|
| 6 |
+
if (!url || !anon) {
|
| 7 |
+
// Helpful logs if something’s still off
|
| 8 |
+
console.error('Env seen by app:', {
|
| 9 |
+
VITE_SUPABASE_URL: url,
|
| 10 |
+
VITE_SUPABASE_ANON_KEY: anon ? '(set)' : '(missing)'
|
| 11 |
+
})
|
| 12 |
+
throw new Error('Missing VITE_SUPABASE_URL or VITE_SUPABASE_ANON_KEY');
|
| 13 |
+
}
|
| 14 |
export const supabase = createClient(url, anon);
|
| 15 |
|
| 16 |
// Helper to run GraphQL queries for features not available in REST
|
vite.config.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
| 1 |
-
// vite.config.js
|
| 2 |
-
import { defineConfig } from 'vite'
|
| 3 |
-
import vue from '@vitejs/plugin-vue'
|
| 4 |
-
|
| 5 |
-
export default defineConfig({
|
| 6 |
-
plugins: [vue()],
|
| 7 |
-
preview: {
|
| 8 |
-
host: true, // listen on 0.0.0.0
|
| 9 |
-
port: 4173, // matches your Docker CMD
|
| 10 |
-
// Allow the Space domain; you can list multiple hosts or use a regex
|
| 11 |
-
allowedHosts: [
|
| 12 |
-
'thefinai-agent-market-arena.hf.space',
|
| 13 |
-
/\.hf\.space$/ // optional: allow any hf.space subdomain
|
| 14 |
-
],
|
| 15 |
-
},
|
| 16 |
-
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|