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

main
md 49 lines 1.45 KB
Rendered Raw
1 # vinext on Railway
2
3 Deploy a vinext App Router application with `Railway.Website.Vinext`.
4 Production uses vinext's production Node server in a Railway service.
5
6 ```typescript
7 const site = yield* Railway.Website.Vinext("Web", {
8 env: { GREETING: "Hello from vinext on Railway!" },
9 });
10 ```
11
12 The example includes client hydration, Home/ISR navigation, an environment-aware
13 `/api/hello?name=Alchemy` endpoint, ISR, and public assets.
14 The default cache is process-local. Configure a shared Redis store through `env.REDIS_URL` for persistence across restarts and replicas.
15 Alchemy injects the cache adapter automatically. Keep ordinary `vinext()`
16 configuration in Vite; configure deployment on `Website.Vinext`.
17
18 ## Run locally
19
20 ```sh
21 bun install
22 bun alchemy dev
23 ```
24
25 The Website runs native `vinext dev` with hot reload and creates no cloud
26 resources. Apply `Alchemy.remote()` to deploy live during development.
27
28 ## Deploy
29
30 Configure [Railway credentials](https://alchemy.run/railway/setup), then run:
31
32 ```sh
33 bun alchemy deploy
34 ```
35
36 Shared props are `rootDir`, `env`, `memo`, `assets`, `dev`, and `domain`.
37 The integration package must be installed in the application; it is loaded
38 at build time.
39
40 ## Test and clean up
41
42 ```sh
43 bun test test/dev.test.ts
44 ALCHEMY_PROFILE=testing bun test test/integ.test.ts
45 bun alchemy destroy
46 ```
47
48 The live suite destroys its previous stack before deploying and cleans up
49 afterward. See the [vinext guide](https://alchemy.run/railway/frontend/vinext).