Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cjus/jmdb
JMdb - A JSON Memory Database with an RESTFul API
https://github.com/cjus/jmdb
Last synced: about 1 month ago
JSON representation
JMdb - A JSON Memory Database with an RESTFul API
- Host: GitHub
- URL: https://github.com/cjus/jmdb
- Owner: cjus
- License: mit
- Created: 2017-05-14T11:24:22.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-06T19:51:22.000Z (about 7 years ago)
- Last Synced: 2024-10-12T23:07:18.139Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 581 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![](./documentation/images/logo.png)
## A JSON Memory Database with a RESTFul APIJMdb 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.
### Sample operations
You can connect to JMdb via your application using [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch) or a [request library](https://github.com/request/request).
| 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 |[See the full documentation](./documentation/documentation.md)
## Installation
Rather then run JMdb from source it's recommended that you use the published docker container which is also available at [Docker container](https://hub.docker.com/r/cjus/jmdb/tags).
To build JMdb from source:
```shell
$ npm install pino-elasticsearch -g
$ npm install
```## Use
Start JMdb and connect via its Restful API.
```shell
$ npm start
``````shell
$ curl http://localhost:4111/v1/jmdb
```## Tests
Artillery (https://artillery.io/) tests can be found in the `test` folder.