0.2.1 • Published 12 years ago
ming v0.2.1
Ming
A Quasi-RESTful Web Service for MongoDB.
Status
Experimental, not well tested.
Installation
- Run
sudo npm install ming -g - Run
ming(see Usage) - Put an SSL-enabled proxy in front of it
Usage
port: Ming Server port (default 1337)connection-string: MongoDB Connection String for the default deployment (default mongodb://localhost/ming)
Example
ming --connection-string mongodb://mymongoserver/mymongodbClients
API
Routes
Documents
GET /retrieve collection namesGET /:collectionretrieve collection statisticsGET /:collection/:documentretrieve documentGET /:collection/:document/:fieldretrieve field of documentPOST /:collection/queryquery documentsPOST /:collectioncreate documentPATCH /:collection/:documentupdate documentDELETE /:collection/:documentdelete document
Files (GridFS)
GET /:prefix.files/:fileretrieve metadata of fileGET /:prefix.files/:file?binary=trueretrieve contents of filePOST /:prefix.filescreate fileDELETE /:prefix.files/:filedelete file
Headers
Authorizationbasic HTTP authorization (e.g. in JavaScript"Authorization : Basic " + btoa(username + ":" + password))