| 1 | # Fly Website: SolidStart |
| 2 | |
| 3 | Deploys a [SolidStart](https://start.solidjs.com) site to Fly with |
| 4 | `Fly.Website.SolidStart` — 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`. |
| 10 | - A Tailwind-styled Card component ships with the page. |
| 11 | - `vite.config.ts` holds only `solidStart()` and the Tailwind plugin — |
| 12 | no `nitroV2Plugin()`; the deploy target owns the nitro plugin |
| 13 | instance. |
| 14 | - Static assets under `public/` (or `static/`) deploy with the service. |
| 15 | |
| 16 | ```ts |
| 17 | const site = yield* Fly.Website.SolidStart("Website", { |
| 18 | env: { GREETING: "Hello from SolidStart on Fly!" }, |
| 19 | }); |
| 20 | ``` |
| 21 | |
| 22 | The integration package must be installed in the project (it is loaded |
| 23 | dynamically at deploy time), alongside `@solidjs/vite-plugin-nitro-2`: |
| 24 | |
| 25 | ```sh |
| 26 | bun add -d @alchemy.run/frontend-frameworks |
| 27 | bun add @solidjs/vite-plugin-nitro-2 |
| 28 | ``` |
| 29 | |
| 30 | ## Deploy |
| 31 | |
| 32 | ```sh |
| 33 | bun install |
| 34 | bun run deploy |
| 35 | ``` |
| 36 | |
| 37 | Unchanged sources skip the build entirely on subsequent deploys — the |
| 38 | input files are content-hashed (scoped by `memo.include`). |
| 39 | |
| 40 | ## Dev |
| 41 | |
| 42 | ```sh |
| 43 | bun run dev |
| 44 | ``` |
| 45 | |
| 46 | `alchemy dev` runs the framework's own dev server (HMR included) and |
| 47 | no cloud resources are created. SolidStart 2's dev server (via |
| 48 | `srvx/node`) misrenders under Bun, so run `alchemy dev` with Node for |
| 49 | this example. |
| 50 | |
| 51 | ## Destroy |
| 52 | |
| 53 | ```sh |
| 54 | bun run destroy |
| 55 | ``` |