@rugo/db
v1.0.0-beta.0
Published
DB service for Rugo Platform
Downloads
3
Readme
Rugo DB
DB Service for Rugo Platform
Usage
node src/start.js
# or
npm run start
Enviroments
PORT
port to mountDIRECTORY
or set directory server to get configMONGO
mongo db uri
Incoming Request
Every request to this service, must have x-rugo-schema
as a schema.
{
"name": "collection's name",
"properties": {
/* mongoose schema */
}
}
API
GET /
-> get/find by query conditionsGET /:id
-> get/find by query conditions and document idPOST /
-> create a new documentPUT /:id
-> replace document which found by document id and query conditionsPATCH /:id
-> update partial of document which found by document id and query conditionsDELETE /:id
-> delete a document which found by document id and query conditions
Exception
{
"errors": [{ "type": "error type", "message": "error message" /* and more for tracking */ }]
}
License
MIT.