@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 49 lines 1.16 KB
Rendered Raw
1 # Railway Website: React Router
2
3 Deploys a [React Router](https://reactrouter.com) v7 (framework mode)
4 site to Railway with `Railway.Website.ReactRouter` — no adapter setup
5 in the project config.
6
7 Alchemy generates a Dockerfile and uploads the build context; Railway builds the image. The Service listens on port 3000.
8
9
10 - `app/routes/home.tsx` is server-rendered on the Railway Service and reads `GREETING` from `process.env`.
11 - A Tailwind-styled Card component ships with the page.
12 - Static assets under `public/` (or `static/`) deploy with the service.
13
14 ```ts
15 const site = yield* Railway.Website.ReactRouter("Website", {
16 env: { GREETING: "Hello from React Router on Railway!" },
17 });
18 ```
19
20 The integration package must be installed in the project (it is loaded
21 dynamically at deploy time):
22
23 ```sh
24 bun add -d @alchemy.run/frontend-frameworks
25 ```
26
27 ## Deploy
28
29 ```sh
30 bun run deploy
31 ```
32
33 Unchanged sources skip the build entirely on subsequent deploys — the
34 input files are content-hashed (scoped by `memo.include`).
35
36 ## Dev
37
38 ```sh
39 bun run dev
40 ```
41
42 `alchemy dev` runs the framework's own dev server (HMR included) and
43 no cloud resources are created.
44
45 ## Destroy
46
47 ```sh
48 bun run destroy
49 ```