JMdb allows clients to store, retrieve, query, update and delete JSON documents. This is accomplished using HTTP methods to specify CRUD (Create, Request, Update and Delete) operations on JSON data. Query operations are also supported which aids in requesting only the specific information your application needs.
You can connect to JMdb via your application using fetch or a request library.
Operation | METHOD | URL |
---|---|---|
Retrieve all users | GET | /v1/jmdb/users |
Retrieve a singe user | GET | /v1/jmdb/users?q=_id=591b496c6b681d6aee880815 |
Query users by favorite artists | GET | /v1/jmdb/users?q=.music.favorites.artists |
Query users who have computers created after 2010 | GET | /v1/jmdb/users?q={.gear.computers.models.year > 2010} |
Delete specific user | DELETE | /v1/jmdb/users?q=_id=591b496c6b681d6aee880815 |
Rather then run JMdb from source it's recommended that you use the published docker container which is also available at Docker container.
To build JMdb from source:
$ npm install pino-elasticsearch -g
$ npm install
Start JMdb and connect via its Restful API.
$ npm start
$ curl http://localhost:4111/v1/jmdb
Artillery (https://artillery.io/) tests can be found in the test
folder.