@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 06:00 UTC

main
ts 20 lines 762 Bytes
Raw
1 import * as Cloudflare from "@alchemy.run/cloudflare";
2 import * as Alchemy from "alchemy";
3 import * as Effect from "effect/Effect";
4 import NotesWorker from "./src/NotesWorker.ts";
5
6 export default Alchemy.Stack(
7 "DomainBetterAuth",
8 { providers: Cloudflare.providers(), state: Cloudflare.state() },
9 Effect.gen(function* () {
10 const notes = yield* NotesWorker;
11 // The foldkit app, built with Vite. Its Worker serves the build and
12 // forwards /api to the Notes Worker, so the app and the Api share one origin.
13 const app = yield* Cloudflare.Website.Foldkit("NotesApp", {
14 main: "src/web/worker.ts",
15 env: { NOTES: notes },
16 assets: { runWorkerFirst: ["/api", "/api/*"] },
17 });
18 return { url: app.url.as<string>() };
19 }),
20 );