cf-crud-service-api-builder
Build an HTTP API for a crud-service.
Installation
npm install --save cf-crud-service-api-builder
Usage
const crudServiceApiBuilder = const router = const logger = const service = const middleware =
Hooks
When using the api builder, you can hook into certain actions to manipulate the request data before it is sent to the database or the response data before it is sent to the requester.
const api = api
Supported hooks are:
create:request
create:response
read:response
update:request
update:response
partialUpdate:request
partialUpdate:response
Events
When using the api builder, you can listen for certain events so that you can add hooks to perform your own actions after a request has been succesful. e.g
const api = api
Supported events are:
create
update
partialUpdate
delete
Credits
Built by developers at Clock.
Licence
Licensed under the ISC