1.0.0-beta.0 • Published 2 years ago
@rugo/db v1.0.0-beta.0
Rugo DB
DB Service for Rugo Platform
Usage
node src/start.js
# or
npm run startEnviroments
PORTport to mountDIRECTORYor set directory server to get configMONGOmongo 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.
1.0.0-beta.0
2 years ago