| 1 | # Fly Website: TanStack Start |
| 2 | |
| 3 | Deploys a [TanStack Start](https://tanstack.com/start) site to Fly with |
| 4 | `Fly.Website.TanStackStart` — no adapter setup in the project config. |
| 5 | |
| 6 | The Node adapter bundle runs as a Fly Service on a Machine (port 3000). |
| 7 | |
| 8 | |
| 9 | - `src/routes/index.tsx` is server-rendered on the Fly Machine and reads `GREETING` from `process.env` through a server function. |
| 10 | - A Tailwind-styled Card component ships with the page. |
| 11 | |
| 12 | ```ts |
| 13 | const site = yield* Fly.Website.TanStackStart("Website", { |
| 14 | env: { GREETING: "Hello from TanStack Start on Fly!" }, |
| 15 | }); |
| 16 | ``` |
| 17 | |
| 18 | The integration package must be installed in the project (it is loaded |
| 19 | dynamically at deploy time): |
| 20 | |
| 21 | ```sh |
| 22 | bun add -d @alchemy.run/frontend-frameworks |
| 23 | ``` |
| 24 | |
| 25 | ## Deploy |
| 26 | |
| 27 | ```sh |
| 28 | bun run deploy |
| 29 | ``` |
| 30 | |
| 31 | Unchanged sources skip the build entirely on subsequent deploys — the |
| 32 | input files are content-hashed (scoped by `memo.include`). |
| 33 | |
| 34 | ## Dev |
| 35 | |
| 36 | ```sh |
| 37 | bun run dev |
| 38 | ``` |
| 39 | |
| 40 | `alchemy dev` runs the framework's own dev server (HMR included) and |
| 41 | no cloud resources are created. |
| 42 | |
| 43 | ## Destroy |
| 44 | |
| 45 | ```sh |
| 46 | bun run destroy |
| 47 | ``` |