About
emmer is a self-hosted API that creates and queries JSON data on different filesystems (local, S3, azure blob, ...). Currently, I've only implemented the local filesystem (contributions are welcome!). The source code is available on GitHub.
Getting started
You can install emmer with the following command. The only prerequisite is go >1.23.
go install github.com/TimoKats/emmer@latest
Next, you can run emmer. Without configuration, emmer will generate a username/password to access the API with. These are logged in the standard output.
emmer -p 2112
API
There are two endpoints: /ping and /api. All CRUD operations are done in /api. The URL path after /api creates a json path (where the first element creates a json file with the same name). So the example below accesses [key1][key2] in file.json.
DELETE/PUT/GET: /api/file/key1/key2/...
The endpoint supports 3 methods, DELETE/PUT/GET. DELETE removes data at the location. GET returns data at the location. PUT requests create/update data at the location. This data is provided in the body. E.g.: the example below would set: file.json[key1][key2] = {"something": "else"}.
BODY: {"something": "else"}
When using PUT requests there are 3 ways to add/update data. The default is add/replace, equivalent to the = operator. The other modes are append (also supports any value) and increment (requires numeric value in request body).
PUT: /api/file/key1/key2?mode=append
.png)
![Dark Patterns: Are Your Games Playing You? [video]](https://www.youtube.com/img/desktop/supported_browsers/firefox.png)