Skip to content

A simple PoC of Fable running SQL using IndexedDB & SharedArrayBuffer via Service Worker

Notifications You must be signed in to change notification settings

delneg/fable-sqljs

Repository files navigation

PoC: Fable + sqljs + absurd-sql + comlink

  • sql.js: wasm sqlite
  • absurd-sql: indexeddb backend sql.js adapter
  • comlink: WebWorker RPC

Demo:

https://thirsty-goldberg-7a9141.netlify.app/

Based on: AbsurdSQL with type orm example

Explanation on why this is cool:

https://jlongster.com/future-sql-web

Develop

pnpm install
pnpm serve

Deploy

You need to set CORP/COEP headers for absurd-sql(SharedArrayBuffer)

  Cross-Origin-Opener-Policy = "same-origin"
  Cross-Origin-Embedder-Policy = "require-corp"

LICENSE

MIT

Original README


This is a project to get quickly setup with absurd-sql. With this you well get a SQLite db that persistently stores data.

Running

After cloning this project:

$ pnpm install
$ pnpm serve

You should be able to go to http://localhost:8080/, and open the console to see some query results.

About

A simple PoC of Fable running SQL using IndexedDB & SharedArrayBuffer via Service Worker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published