diff --git a/README.md b/README.md index 264b94e..1d6f3a6 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ A dialogue game. Using Vite, ChatGPT and Lit Web Components. -[Rusty Backend Repo](https://github.com/stevenhuyn/plakait-backend) +[Backend Repo](https://github.com/stevenhuyn/plakait-backend) ## Outdated Screenshot ![Example UI showing a completed game](./media/example-game.png) diff --git a/src/utility/Api.ts b/src/utility/Api.ts index 53621b9..3f556cf 100644 --- a/src/utility/Api.ts +++ b/src/utility/Api.ts @@ -1,10 +1,15 @@ import { Scenario } from "./Scenario"; +console.log(window.location.host); +console.log(window.location.host.includes("plakait")); + const BACKEND_BASE_URL = window.location.host.includes("plakait") ? new URL("https://plakait-backend-production.up.railway.app/") : new URL("http://localhost:8000/"); +console.log("BACKEND_BASE_URL", BACKEND_BASE_URL); + export type BotMessage = { type: "Bot"; name: string;