1.0.0 • Published 8 years ago

sgs-routing v1.0.0

Weekly downloads
12
License
-
Repository
github
Last release
8 years ago

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