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

main
ts 25 lines 728 Bytes
Raw
1 import * as Cloudflare from "@alchemy.run/cloudflare";
2 import * as Drizzle from "@alchemy.run/drizzle";
3 import * as Turso from "@alchemy.run/turso";
4 import * as Alchemy from "alchemy";
5 import * as Effect from "effect/Effect";
6 import * as Layer from "effect/Layer";
7 import Api from "./src/Api.ts";
8 import { Template } from "./src/Db.ts";
9
10 export default Alchemy.Stack(
11 "CloudflareTursoDrizzleExample",
12 {
13 providers: Layer.mergeAll(Cloudflare.providers(), Turso.providers(), Drizzle.providers()),
14 state: Alchemy.localState(),
15 },
16 Effect.gen(function* () {
17 const template = yield* Template;
18 const api = yield* Api;
19
20 return {
21 url: api.url.as<string>(),
22 template: template.name,
23 };
24 }),
25 );