From d51b4263aba59f60277766fc024f2931fc8874ec Mon Sep 17 00:00:00 2001 From: Frank Date: Fri, 23 May 2025 15:57:33 -0400 Subject: Share: sync --- app/infra/app.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'app/infra') diff --git a/app/infra/app.ts b/app/infra/app.ts index 1a97740f4..ee33d91a9 100644 --- a/app/infra/app.ts +++ b/app/infra/app.ts @@ -1,6 +1,13 @@ +export const domain = (() => { + if ($app.stage === "production") return "opencode.ai" + if ($app.stage === "dev") return "dev.opencode.ai" + return `${$app.stage}.dev.opencode.ai` +})() + const bucket = new sst.cloudflare.Bucket("Bucket") export const api = new sst.cloudflare.Worker("Api", { + domain: `api.${domain}`, handler: "packages/function/src/api.ts", url: true, link: [bucket], @@ -25,12 +32,12 @@ export const api = new sst.cloudflare.Worker("Api", { new sst.cloudflare.StaticSite("Web", { path: "packages/web", + domain, environment: { VITE_API_URL: api.url, }, - errorPage: "fallback.html", build: { command: "bun run build", - output: "dist/client", + output: "dist", }, }) -- cgit v1.2.3