0.0.1 • Published 7 years ago

jmdb v0.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

npm.io

A JSON Memory Database with a RESTFul API

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.

Sample operations

You can connect to JMdb via your application using fetch or a request library.

OperationMETHODURL
Retrieve all usersGET/v1/jmdb/users
Retrieve a singe userGET/v1/jmdb/users?q=_id=591b496c6b681d6aee880815
Query users by favorite artistsGET/v1/jmdb/users?q=.music.favorites.artists
Query users who have computers created after 2010GET/v1/jmdb/users?q={.gear.computers.models.year > 2010}
Delete specific userDELETE/v1/jmdb/users?q=_id=591b496c6b681d6aee880815

See the full documentation

Installation

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

Use

Start JMdb and connect via its Restful API.

$ npm start
$ curl http://localhost:4111/v1/jmdb

Tests

Artillery (https://artillery.io/) tests can be found in the test folder.