diff --git a/justfile b/justfile index c7420d5..1322732 100644 --- a/justfile +++ b/justfile @@ -26,4 +26,4 @@ deploy-api-dev: gcloud run deploy xablo-api-dev --source api --region europe-west1 --set-env-vars "SUPABASE_URL=https://mhcafqvzbrrwvahpvvzd.supabase.co" --set-env-vars "SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im1oY2FmcXZ6YnJyd3ZhaHB2dnpkIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImlhdCI6MTc0MTI0MTMyMSwiZXhwIjoyMDU2ODE3MzIxfQ.9r33CUsu6ZR4vyv4ed-UY6cLE1FZzSSxTNE8pFUKjN4" --set-env-vars "STREAM_CHAT_API_KEY=t5vvvddteapa" --set-env-vars "STREAM_CHAT_API_SECRET=zrr32sqenw3atpv9rnz2nhhyyncf7bunr7fmfqy9r7e69fcw978dhzevmhpxa2jj" --set-env-vars "FRONTEND_URL=https://xtablo-ui-dev.arbelleville.workers.dev" --set-env-vars "EMAIL_USER=baptiste@xtablo.com" --set-env-vars "EMAIL_KEY=jayf pzpj nrsv vtim" --set-env-vars "XTABLO_URL=https://xtablo-ui-dev.arbelleville.workers.dev" deploy-api-prod: - gcloud run deploy xablo-api --source api --region europe-west1 --set-env-vars "SUPABASE_URL=https://mhcafqvzbrrwvahpvvzd.supabase.co" --set-env-vars "SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im1oY2FmcXZ6YnJyd3ZhaHB2dnpkIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImlhdCI6MTc0MTI0MTMyMSwiZXhwIjoyMDU2ODE3MzIxfQ.9r33CUsu6ZR4vyv4ed-UY6cLE1FZzSSxTNE8pFUKjN4" --set-env-vars "STREAM_CHAT_API_KEY=t5vvvddteapa" --set-env-vars "STREAM_CHAT_API_SECRET=zrr32sqenw3atpv9rnz2nhhyyncf7bunr7fmfqy9r7e69fcw978dhzevmhpxa2jj" --set-env-vars "FRONTEND_URL=https://app.xtablo.com" --set-env-vars "EMAIL_USER=baptiste@xtablo.com" --set-env-vars "EMAIL_KEY=jayf pzpj nrsv vtim" --set-env-vars "XTABLO_URL=https://app.xtablo.com" + gcloud run deploy xablo-api --source api --region europe-west1 --set-env-vars "SUPABASE_URL=https://mhcafqvzbrrwvahpvvzd.supabase.co" --set-env-vars "SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im1oY2FmcXZ6YnJyd3ZhaHB2dnpkIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImlhdCI6MTc0MTI0MTMyMSwiZXhwIjoyMDU2ODE3MzIxfQ.9r33CUsu6ZR4vyv4ed-UY6cLE1FZzSSxTNE8pFUKjN4" --set-env-vars "STREAM_CHAT_API_KEY=v4yf8rs94aa8" --set-env-vars "STREAM_CHAT_API_SECRET=jq2szvv73ua7sz9tvr9y24dxg37sw8ue8t576fu7ggr4h6wvcmunby4gvte8tm8f" --set-env-vars "FRONTEND_URL=https://app.xtablo.com" --set-env-vars "EMAIL_USER=baptiste@xtablo.com" --set-env-vars "EMAIL_KEY=jayf pzpj nrsv vtim" --set-env-vars "XTABLO_URL=https://app.xtablo.com" diff --git a/ui/.env.dev b/ui/.env.dev index bba526c..b9ad54d 100644 --- a/ui/.env.dev +++ b/ui/.env.dev @@ -6,4 +6,4 @@ VITE_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFz VITE_SUPABASE_ID=mhcafqvzbrrwvahpvvzd VITE_STREAM_CHAT_API_KEY="t5vvvddteapa" -VITE_API_URL=https://xablo-api-636270553187.europe-west1.run.app \ No newline at end of file +VITE_API_URL=https://xablo-api-dev-636270553187.europe-west1.run.app \ No newline at end of file diff --git a/ui/package.json b/ui/package.json index ba37bac..f0f0511 100644 --- a/ui/package.json +++ b/ui/package.json @@ -4,7 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { - "dev": "vite", + "dev": "vite dev", "typecheck": "tsc -b", "lint": "eslint .", "preview": "vite preview", diff --git a/ui/src/config.ts b/ui/src/config.ts deleted file mode 100644 index bc224ef..0000000 --- a/ui/src/config.ts +++ /dev/null @@ -1 +0,0 @@ -export const IS_DEV = process.env.NODE_ENV === "development"; diff --git a/ui/src/lib/api.ts b/ui/src/lib/api.ts index f921465..c902b4d 100644 --- a/ui/src/lib/api.ts +++ b/ui/src/lib/api.ts @@ -1,12 +1,9 @@ import axios from "axios"; import { QueryClient } from "@tanstack/react-query"; -import { IS_DEV } from "@ui/config"; // Create axios instance with default config export const api = axios.create({ - baseURL: IS_DEV - ? "http://127.0.0.1:8080" - : "https://xablo-api-636270553187.europe-west1.run.app", + baseURL: import.meta.env.VITE_API_URL, headers: { "Content-Type": "application/json", }, diff --git a/ui/wrangler.toml b/ui/wrangler.toml index e444dcc..851e052 100644 --- a/ui/wrangler.toml +++ b/ui/wrangler.toml @@ -1,6 +1,6 @@ name = "xtablo-ui" main = "worker/index.ts" -compatibility_date = "2025-07-11" +compatibility_date = "2025-07-09" [assets] directory = "./dist/"