amid
v1.2.5
Published
Another Mongo Internet Driver
Downloads
37
Readme
Name
AMID - Another.js Mongo Internet Driver
Description
Node.js REST interface for MongoDB, we modified mongodb-rest (https://github.com/tdegrunt/mongodb-rest) to manage more operation:
- counting elements
- "distinct" operations
- excel/csv export
- list of available db collection
- list of keys of a specific query
- Multithreading support
It's now also possible to search by date range and are managed sort operations.
Installation
Installation is now via npm: npm install amid
.
After that you can just issue amid-rest
on the command line and the server should start.
Notes
Supported REST requests:
GET /db/collection
- Returns all documentsGET /db/collection?query=%7B%22isDone%22%3A%20false%7D
- Returns all documents satisfying queryGET /db/collection?query=%7B%22isDone%22%3A%20false%7D&limit=2&skip=2
- Ability to add options to query (limit, skip, etc)GET /db/collection/id
- Returns document with idGET db
- List all collection/documentGET /db/collection/?operation=key
- List all key of collectionGET /db/collection/?operation=excel&query=%7B%22isDone%22%3A%20false%7D
- export query in excelGET /db/collection/?sort=[{"property":null,"direction":"ASC"}]
- Returns all document soted by ASCGET /db/collection?query=%7B%22isDone%22%3A%20false%7D&operation=count
- Count elementsGET /db/collection?operation=distinct&fields=Market&sort=[{"property":null,"direction":"ASC"}]
- Distinct and sort operationPOST /db/collection
- Insert new document in collection (document in POST body)PUT /db/collection/id
- Update document with id (updated document in PUT body)DELETE /db/collection/id
- Delete document with id
Content Type:
- Please make sure
application/json
is used as Content-Type when using POST/PUT with request body's.
Dependencies:
- Are all indicated in package.json.
Credits
Authors
- Mariano Fiorentino
- Andrea Negro