mongoviewer-server v0.2.2
MongoViewer 
MongoDB + Node.js + Express + D3
Install API Server CLI
MongoDB + Node.js + Express
npm install -g mongoviewer-serverUsage
Start your MongoViewer API Server:
mongoviewer-serverBy default it will serve on port 8080: http://localhost:8080/.
See configuration options for customizing your API server.
Example customized:
mongoviewer-server --server:port 8081 --mongo:database testDbSee the API documentation for more details.
Developing MongoViewer
MongoDB + Node.js + Express + D3

Installation
npm install
bower installUsage
node index.jsConfiguration
Uses nconf.
See the default configuration file at default_config.json.
Alternatively you can use additional command line arguments:
--server:port 8080- Default8080.--server:CORS 1- Defaulttrue(1),falseis0.--mongo:port 27017- Default27017--mongo:database mongoviewer- Default ismongoviewer.
For example:
node index.js --server:port 8081 --mongo:database testDbAPI
Version 1
/api/v1/Find
See db.collection.find.
GET /api/v1/:collection/findQuery Parameters:
- query
- options
FindOne
GET /api/v1/:collection/findOneQuery Parameters:
- query
- options
Aggregate
GET /api/v1/:collection/aggregateQuery Parameters:
- pipeline
- options
Example API Usage
Load the example dataset, discreteData
node load.jsStart the Server
node index.jsThis will start the server. Now you can view at http://localhost:8080/.
Example find API Query
Request: http://localhost:8080/api/v1/discreteBar/find?query={"label":"A Label"}
Response:
[
{
"label": "A Label",
"value": -29.765957771107,
"_id": "532e5294c1f6d3f17df677ba"
}
]Example findOne API Query
Request: http://localhost:8080/api/v1/discreteBar/findOne?query={"label":"A Label"}
Response:
{
"label": "A Label",
"value": -29.765957771107,
"_id": "532e5294c1f6d3f17df677ba"
}Example aggretate API Query
Request: http://localhost:8080/api/v1/discreteBar/aggregate?pipeline=[{"$match":{"label":"A Label"}}]
Response:
[
{
"label": "A Label",
"value": -29.765957771107,
"_id": "532e5294c1f6d3f17df677ba"
}
]