Show HN: Self-hosted API for CRUD-ing JSON data
timokats.xyzSelf-hosted API for CRUD-ing JSON data in GO. No setup required. Perfect for quick data storage tasks (or e.g. mocking an API).
The API is based on your JSON structure. So the example below is for CRUD-ing [key1][key2] in file.json. The value (which can be anything) is then added to the body of the request. Moreover, there are helper functions for appending and incrementing values.
DELETE/PUT/GET: /api/file/key1/key2/... Nice. So sending {"username": "tom"} to /api/test/users will create > test.json with {"users": {"username": "tom"}} ?
Yes! And you can use "append" mode for use cases like these also. Then the value will be added as a list object. So:
{users: [{"username": "tom"}, {"username": "tim"}]}