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

main
ts 27 lines 714 Bytes
Raw
1 import * as Cloudflare from "@alchemy.run/cloudflare";
2 import * as Effect from "effect/Effect";
3 import * as HttpServerResponse from "effect/http/HttpServerResponse";
4 import { HOSTNAME } from "./Store.ts";
5
6 /**
7 * Owns the hostname as a custom domain (DNS record + certificate) and
8 * answers every path no route claims. It binds nothing.
9 */
10 export default class Home extends Cloudflare.Worker<Home>()(
11 "Home",
12 {
13 main: import.meta.url,
14 domain: HOSTNAME,
15 },
16 Effect.succeed({
17 fetch: HttpServerResponse.json({
18 endpoints: [
19 "GET /products",
20 "GET /products/:id",
21 "POST /orders",
22 "GET /orders/:id",
23 "PUT /admin/products/:id",
24 ],
25 }),
26 }),
27 ) {}