View on GitHub

Mangusu

sugared mongoose resources for the express framework

Download this project as a .zip file Download this project as a tar.gz file

Responses

There are custom response functions that are used to wrap the normal express responses — they're mainly there to just make sure the correct status codes are being used.

20x

FunctionStatus CodeArguments
ok200
  • res: the express response
  • body: the body of the response
created201
  • res: the express response
  • body: the body of the response
no_content204
  • res: the express response
  • body: the body of the response
reset205
  • res: the express response
  • body: the body of the response

40x

FunctionStatus CodeArguments
bad_request400
  • res: the express response
  • body: the body of the response
unauthorized401
  • res: the express response
  • body: the body of the response
forbidden403
  • res: the express response
  • body: the body of the response
not_found404
  • res: the express response
  • body: the body of the response
not_acceptable406
  • res: the express response
  • body: the body of the response
conflict409
  • res: the express response
  • body: the body of the response

50x

FunctionStatus CodeArguments
internal_error500
  • res: the express response
  • body: the body of the response