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

main
ts 25 lines 810 Bytes
Raw
1 import * as Cloudflare from "@alchemy.run/cloudflare";
2 import * as Neon from "@alchemy.run/neon";
3 import * as Alchemy from "alchemy";
4 import * as Effect from "effect/Effect";
5 import * as Layer from "effect/Layer";
6 import SqlPostgresWorker from "./postgres-worker.ts";
7
8 /**
9 * Neon Postgres origin + Hyperdrive + Worker for the `SQL.Postgres` client
10 * suite. Kept in its own file so it can also be driven directly, e.g.
11 * `alchemy logs --tail --stage test --config ./test/SQL/fixtures/postgres-stack.ts`.
12 */
13 export default Alchemy.Stack(
14 "SqlPostgresStack",
15 {
16 providers: Layer.merge(Cloudflare.providers(), Neon.providers()),
17 state: Cloudflare.state(),
18 },
19 Effect.gen(function* () {
20 const worker = yield* SqlPostgresWorker;
21 return {
22 url: worker.url.as<string>(),
23 };
24 }),
25 );