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? :)

#SmallWeb #SiteJS

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

Please feel free to chime in :)

gist.github.com/aral/fc4115fdf

#SiteJs #SmallWeb #WhatDB

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 :)

Follow

@aral I added a follow-up regarding negations :)

· · Web · 0 · 0 · 0
Sign in to participate in the conversation
Mastodon

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!