Loading video...
Video Failed to Load
You can put SQLite in the browser now? Yeah, here's how ๐
43,240 views โข 1 year ago โขvia X (Twitter)
10 Comments

Is this April fools

SQLocal rolls off the tongue

Yep, I use this for local first web apps, sharing the same drizzle schema for front and back end, works like a dream.

iโm sorry what

or ?

Ah, there's an important distinction: sql.js runs in memory, while the sqlite wasm build writes to a file. This persists data even when closing your web app

Did Electron and Tauri apps with their own local database just get super easy because of this? IDK but it looks exciting.

Use cases?

If only there was this thing where SQLite was just baked into every browser. Probably could call it WebSQL. Sadly, we canโt have nice things ๐

Recently started using this in CI for a side project: Same concept. Can be in memory or to IndexedDB. Really nice to have a Postgres-compatible API rather than having to adjust my code to write Postgres in prod & SQLite in CI.

