sgs-routing
v1.0.0
Published
Sagacify's routing module.
Downloads
2
Readme
sgs-routehandler
Express middleware to handle an api route by following the paths et taking action at the last route part regarding the CRUD spec.
Mongoose must be loaded in global scope beforehand.
The next routes are supported (not exhaustive):
- GET /api/
- POST /api/
- GET /api//:id
- GET /api//
- PUT /api//:id
- DELETE /api//:id
- GET /api//:id/
- POST /api//:id/
- POST /api//:id/
- GET /api//:id//:embeddedId
- PUT /api//:id//:embeddedId
- DELETE /api//:id//:embeddedId