Share: sync
This commit is contained in:
parent
34a2dcb80a
commit
d51b4263ab
25 changed files with 1395 additions and 338 deletions
|
|
@ -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",
|
||||
},
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue