| 1 | # Hetzner Website: Vite + Notes API |
| 2 | |
| 3 | A Tailwind React SPA (`Hetzner.Website.Vite`) that reads and writes notes |
| 4 | through an Effect `Hetzner.Service`. Hetzner has no managed Postgres, so |
| 5 | the API stores rows in a [Neon](https://neon.tech) branch. |
| 6 | |
| 7 | - `alchemy deploy` builds the SPA (inlining `VITE_API_URL`) onto a `cpx12` |
| 8 | in `fsn1` and deploys the API unit on the same Server. |
| 9 | - `alchemy dev` is Vite's own server (HMR included). |
| 10 | |
| 11 | ```sh |
| 12 | export HCLOUD_TOKEN=... |
| 13 | bun run deploy |
| 14 | ``` |
| 15 | |
| 16 | The SPA is at `http://{ipv4}:3000`. The API is at `http://{ipv4}:3001` |
| 17 | (`GET`/`POST /notes`). |
| 18 | |
| 19 | ```sh |
| 20 | bun run destroy |
| 21 | ``` |