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

main
ts 20 lines 659 Bytes
Raw
1 import * as Prisma from "@alchemy.run/prisma";
2 import * as Alchemy from "alchemy";
3 import * as Effect from "effect/Effect";
4 import Api from "./src/Api.ts";
5 import { Project } from "./src/Database.ts";
6
7 export default Alchemy.Stack(
8 "PrismaTutorial",
9 { providers: Prisma.providers(), state: Alchemy.localState() },
10 Effect.gen(function* () {
11 const project = yield* Project.pipe(Alchemy.remote());
12 const api = yield* Api.pipe(Alchemy.remote());
13 const site = yield* Prisma.Website.Vite("Website", {
14 project,
15 regionId: "eu-west-3",
16 env: { VITE_API_URL: api.url },
17 });
18 return { url: site.url, apiUrl: api.url };
19 }),
20 );