From 83974e0c95d65c72d12e7d58a287514c39f3768f Mon Sep 17 00:00:00 2001 From: Frank Date: Fri, 23 May 2025 14:17:45 -0400 Subject: Share: sync --- app/infra/app.ts | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 app/infra/app.ts (limited to 'app/infra') 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", + }, +}) -- cgit v1.2.3