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

main
ts 24 lines 840 Bytes
Raw
1 import { Connection } from "@alchemy.run/prisma/Connection";
2 import { Postgres } from "@alchemy.run/prisma/Postgres";
3 import { Project } from "@alchemy.run/prisma/Project";
4 import { Stage } from "alchemy/Stage";
5 import * as Effect from "effect/Effect";
6
7 /**
8 * Local Prisma Postgres used as the container's DATABASE_URL origin — the
9 * #1334 demo shape (arbitrary image + connection.directConnectionString).
10 */
11 export const PrismaHostConnection = Effect.gen(function* () {
12 const project = yield* Project("PrismaHostProject", {
13 createDatabase: false,
14 });
15 const database = yield* Postgres("PrismaHostDb", {
16 project,
17 name: "main",
18 dev: {
19 name: `alchemy-container-prisma-host-${yield* Stage}`,
20 persistenceMode: "stateless",
21 },
22 });
23 return yield* Connection("PrismaHostConnection", { database });
24 });