You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
1.5 KiB
Markdown
34 lines
1.5 KiB
Markdown
+++
|
|
title = "Document local dev environment — Turso/SQLite instead of D1, any wrangler.toml config required"
|
|
priority = 5
|
|
status = "todo"
|
|
ticket_type = "task"
|
|
dependencies = ["f3dc74", "33ed29"]
|
|
+++
|
|
|
|
<context>
|
|
The `quotesdb` API is built with Axum + Tokio, targeting Cloudflare Workers via `workers-rs`. It serves JSON at `/api/*` endpoints and persists data to Cloudflare D1 (production) or a local SQLite file via Turso (development). Source lives in `src/bin/api/`.
|
|
|
|
Shared types and utilities are in `src/lib.rs` — code placed there must compile for both the host target and `wasm32-unknown-unknown`.
|
|
|
|
Local development uses Turso (file-backed SQLite) instead of Cloudflare D1. The API reads the database connection string from an environment variable. There may also be `wrangler.toml` configuration needed for `wrangler dev`.
|
|
</context>
|
|
|
|
<goal>
|
|
Write documentation (in `docs/PLANNING.md` or a dedicated `docs/LOCAL_DEV.md`) explaining how to set up and run the API locally:
|
|
1. How to install/run Turso for a local SQLite file
|
|
2. What environment variables to set (database URL, etc.)
|
|
3. How to run `cargo run` to start the API server
|
|
4. Any `wrangler.toml` configuration needed for `wrangler dev` (if applicable)
|
|
5. How the D1 vs Turso selection is made at runtime
|
|
</goal>
|
|
|
|
<constraints>
|
|
- Do not commit any `.env` files — document the variables, not the values.
|
|
- Cross-reference the TRIAGE ticket 33ed29 decision on Turso vs D1 local selection strategy.
|
|
</constraints>
|
|
|
|
<commit>
|
|
`docs(quotesdb): document local dev environment setup for api`
|
|
</commit>
|