@devries-cameron20 / t3code Mirror · read-only
Fork 0

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

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 06:00 UTC

main
md 51 lines 1.55 KB
Rendered Raw
1 # vinext on Prisma
2
3 Deploy a vinext App Router application with `Prisma.Website.Vinext`.
4 Alchemy builds Vinext programmatically, injects its cache adapter, and runs
5 vinext's Node server on Prisma Compute's Bun runtime. Deployment configuration
6 stays on `Website.Vinext`; no Alchemy Vite plugin, Dockerfile, or registry is needed.
7
8 ```typescript
9 const site = yield* Prisma.Website.Vinext("Web", {
10 env: { GREETING: "Hello from vinext on Prisma!" },
11 });
12 ```
13
14 ## Run locally
15
16 ```sh
17 bun install
18 bun alchemy dev
19 ```
20
21 The Website runs native `vinext dev` with hot reload and creates no Prisma
22 resources. Apply `Alchemy.remote()` to use live Compute during development.
23
24 ## Deploy
25
26 Configure [Prisma credentials](https://alchemy.run/prisma/setup), then run:
27
28 ```sh
29 bun alchemy deploy
30 ```
31
32 The site creates its own database-less project. Use `project` for an existing
33 project, `domain` for a custom hostname, and `compute` for deployment options.
34 The routes exercise a rendered home page, request-dependent `/api/hello`,
35 `/isr`, `/example.json`, and `/robots.txt`.
36
37 The default data cache is process-local. Set a redacted `REDIS_URL` for a
38 persistent shared Redis cache. Prisma.Website does not provision Redis.
39 `@vercel/nft` packages locally installed runtime dependencies; native addons
40 must be built for Linux.
41
42 ## Test and clean up
43
44 ```sh
45 bun test test/dev.test.ts
46 ALCHEMY_PROFILE=testing bun test test/integ.test.ts
47 bun alchemy destroy
48 ```
49
50 The live suite destroys its previous stack before deploying and cleans up
51 afterward. See the [vinext guide](https://alchemy.run/prisma/frontend/vinext).