diff options
Diffstat (limited to 'app/infra')
| -rw-r--r-- | app/infra/app.ts | 11 |
1 files changed, 9 insertions, 2 deletions
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", }, }) |
