Full text active search on the Edge with turso + fly.io.
Turso.example.project.mp4
Read my full thoughts from https://quteo.com/blog/replace-postgresql-with-2000-sqlite-databases
Uses Golang and the following technologies.
- HTMX
- Echo
- Templ
- Tailwind
- AlpineJS
- Turso
Graciously developed by https://quteo.com
As there are a bunch of things that need to be generated and built for a full server restart, we use Air to handle all that for us.
- install turso-cli https://docs.turso.tech/cli/introduction
- install flyctl https://fly.io/docs/hands-on/install-flyctl/
npm install -D tailwindcss
go install github.com/a-h/templ/cmd/templ@latest
go install github.com/sqlc-dev/sqlc/cmd/sqlc@latest
go install github.com/cosmtrek/air@latest
Save token and db url to .env file
turso db create --enable-extensions test
turso token create test
turso db show test
After this you should have a .env file in root of this project that looks like this.
DB_URL=libsql://<db-name>-<username>.turso.io
DB_TOKEN=<some long token>
Now you are ready to roll.
turso db shell solid-spitfire < create_tables.sql
air server --port 3000
You have a turso db already but to deploy it fully you need fly.io and their flyctl tool.
fly launch
Check which url fly launched at and go there, this is your app now.
This project is for example and learning purposes. Go is not my main language, I'm just learning it while doing this.
So pardon my spaghetti code!
Do whatever, I don't care.