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