| 1 | # AWS Website: SolidStart |
| 2 | |
| 3 | Deploys a [SolidStart](https://start.solidjs.com) app to AWS with |
| 4 | `AWS.Website.SolidStart` — no adapter wiring and no CloudFormation |
| 5 | templates. Alchemy runs the project's own `vite build` and appends |
| 6 | nitro's `aws-lambda` preset: the SSR server runs on a streaming Lambda |
| 7 | Function URL, and client assets are served from S3 behind a CloudFront |
| 8 | distribution. |
| 9 | |
| 10 | - `src/routes/index.tsx` is server-rendered in the Lambda on every |
| 11 | request and reads the `GREETING` environment value declared in |
| 12 | `alchemy.run.ts` from `process.env`. |
| 13 | - `vite.config.ts` holds only `solidStart()` and the Tailwind plugin — |
| 14 | no `nitroV2Plugin()`; the deploy target owns the nitro plugin |
| 15 | instance. |
| 16 | - Everything under `public/` deploys as static assets. |
| 17 | |
| 18 | The integration package must be installed in the project (it is loaded |
| 19 | dynamically at deploy time), alongside `@solidjs/vite-plugin-nitro-2`: |
| 20 | |
| 21 | ```sh |
| 22 | bun add -d @alchemy.run/frontend-frameworks |
| 23 | bun add @solidjs/vite-plugin-nitro-2 |
| 24 | ``` |
| 25 | |
| 26 | ## Deploy |
| 27 | |
| 28 | ```sh |
| 29 | bun install |
| 30 | bun run deploy |
| 31 | ``` |
| 32 | |
| 33 | Unchanged sources skip the SolidStart build entirely on subsequent |
| 34 | deploys — the input files are content-hashed (scoped by |
| 35 | `memo.include`). |
| 36 | |
| 37 | ## Local dev |
| 38 | |
| 39 | ```sh |
| 40 | npx alchemy dev |
| 41 | ``` |
| 42 | |
| 43 | Runs SolidStart's own Vite dev server — no AWS resources beyond the |
| 44 | state store. SolidStart 2's dev server (via `srvx/node`) misrenders |
| 45 | under Bun, so run `alchemy dev` with Node for this example. |
| 46 | |
| 47 | ## Destroy |
| 48 | |
| 49 | ```sh |
| 50 | bun run destroy |
| 51 | ``` |