1.0.0 • Published 8 years ago
sgs-routing v1.0.0
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
1.0.0
8 years ago