@js-items/express
v1.0.19
Published
Concrete implementation of js-items for express
Downloads
10
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
item
instead ofentity
- cursor based pagination operates using
before
andafter
instead ofcursor
anddirection
- additional
totalCount
property on pagination object - optional
enveloping
response (GET /endpoint?envelope=true
) for clients not capable of working with headers and JSONP granular transactions handlers
for eachrequest handler
- this could be used for i.e.authentication
orpermissions
checks- possibility to
override
eachrequest handler
- ability to disable json body parser middleware if already present in the stack (
enableJsonBodyParser: false
) - by default all responses are
pretty
which improves readability, you can disable that by query param (/endpoint?pretty=false
)
Installation:
npm i @js-items/express --save
Credits: