diff options
| author | Frank <[email protected]> | 2025-05-23 15:57:33 -0400 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2025-05-26 12:40:17 -0400 |
| commit | d51b4263aba59f60277766fc024f2931fc8874ec (patch) | |
| tree | a9dfed63563a88bc26cb2d37d582e2c14a5d9331 /app/infra | |
| parent | 34a2dcb80a28e208c986d39ce1e145f245691f62 (diff) | |
| download | opencode-d51b4263aba59f60277766fc024f2931fc8874ec.tar.gz opencode-d51b4263aba59f60277766fc024f2931fc8874ec.zip | |
Share: sync
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", }, }) |
