@js-items/express
v1.0.19
Published
Concrete implementation of js-items for express
Readme
express
express.js implementation of js-items
There is a fantastic alternative to this project (and @js-items/express is based on it): js-entity-repos/express.
The main differences to the @js-entity-repos/express:
- different naming convention: using
iteminstead ofentity - cursor based pagination operates using
beforeandafterinstead ofcursoranddirection - additional
totalCountproperty on pagination object - optional
envelopingresponse (GET /endpoint?envelope=true) for clients not capable of working with headers and JSONP granular transactions handlersfor eachrequest handler- this could be used for i.e.authenticationorpermissionschecks- possibility to
overrideeachrequest handler - ability to disable json body parser middleware if already present in the stack (
enableJsonBodyParser: false) - by default all responses are
prettywhich improves readability, you can disable that by query param (/endpoint?pretty=false)
Installation:
npm i @js-items/express --save
Credits:
