Every time I need to persist some simple data on a web app, I go through a dreaded “which database should I use?” process which – given I’m not building a global panopticon – is *always* overkill so I’ve decided to bite the bullet and write a very basic transparent (using Proxy) in-memory database for Site.js that flushes to JSON files on each write and is available on all your routes so you can use it without knowing you’re using a database. Working title: What Database? :)

So I’m throwing around ideas for the interface of the simple local persistence layer for Site.js.

Please feel free to chime in :)


Show thread

@aral so I just brainstormed some things, that imho still are relatively kiss.

Added one example of nested json that might add a tad of complexity, but then again maybe not if looked at well.


@humanetech Thanks, appreciate it. About to take a look now :)

· · Web · 1 · 0 · 0
Sign in to participate in the conversation
Aral’s Mastodon

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!