diff options
| author | Frank <[email protected]> | 2025-05-23 14:17:45 -0400 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2025-05-26 12:40:17 -0400 |
| commit | 83974e0c95d65c72d12e7d58a287514c39f3768f (patch) | |
| tree | 274625aa4693b0d71b50eae3cfedb5d6245f99f9 /app/infra | |
| parent | 59d43fa5da0619655c7ba3360e969bcbda1716ea (diff) | |
| download | opencode-83974e0c95d65c72d12e7d58a287514c39f3768f.tar.gz opencode-83974e0c95d65c72d12e7d58a287514c39f3768f.zip | |
Share: sync
Diffstat (limited to 'app/infra')
| -rw-r--r-- | app/infra/app.ts | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/app/infra/app.ts b/app/infra/app.ts new file mode 100644 index 000000000..1a97740f4 --- /dev/null +++ b/app/infra/app.ts @@ -0,0 +1,36 @@ +const bucket = new sst.cloudflare.Bucket("Bucket") + +export const api = new sst.cloudflare.Worker("Api", { + handler: "packages/function/src/api.ts", + url: true, + link: [bucket], + transform: { + worker: (args) => { + args.bindings = $resolve(args.bindings).apply((bindings) => [ + ...bindings, + { + name: "SYNC_SERVER", + type: "durable_object_namespace", + className: "SyncServer", + }, + ]) + args.migrations = { + oldTag: "v1", + newTag: "v1", + //newSqliteClasses: ["SyncServer"], + } + }, + }, +}) + +new sst.cloudflare.StaticSite("Web", { + path: "packages/web", + environment: { + VITE_API_URL: api.url, + }, + errorPage: "fallback.html", + build: { + command: "bun run build", + output: "dist/client", + }, +}) |
