Proof of concept htmx website that shows a list of things that updates every 1s with a CRUD http API backed by PostgREST that spins up with one command.
Mutate state via SQL or HTTP and page reflects changes.
Built in about 45 mins. Taking longer to write this readme. Inspired by Providing HTML Content Using Htmx
up.sh
-> maintains persistence
up-clean.sh
-> resets persistence
Runs on http://localhost:3000/rpc/index
# Add thing
curl -d '{"name":"Curl Thing"}' -H "Content-Type: application/json" -X POST http://localhost:3000/things
# Delete thing with id = 1
curl -X "DELETE" http://localhost:3000/things?id=eq.1
Adminer for quick & dirty database work.
Adding filesystem driven convention based routing/actions and wiring that to migrations would be cool.