
Security News
Meet Socket at Black Hat Europe and BSides London 2025
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.
@clocklimited/cf-crud-service-api-builder
Advanced tools
Build an HTTP API for a @clocklimited/crud-service.
npm install --save @clocklimited/cf-crud-service-api-builder
npm install --save @clocklimited/schemata
const crudServiceApiBuilder = require('cf-crud-service-api-builder')
const router = require('express')()
const logger = require('bunyan').createLogger()
const service = require('./service')
const middleware = require('./auth-check-middleware')
crudServiceApiBuilder(service, '/widgets', router, logger, middleware)
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 = crudServiceApiBuilder(
service,
'/article',
router,
logger,
middleware
)
api.hook('create:request', function (data, cb) {
// do whatever you like with the data
cb(null, data)
})
Supported hooks are:
create:requestcreate:responseread:responseupdate:requestupdate:responsepartialUpdate:requestpartialUpdate:responseWhen 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 = crudServiceApiBuilder(
service,
'/article',
router,
logger,
middleware
)
api.on('create', function (req, newArticle) {
// do whatever you like with the req and article object
})
Supported events are:
createupdatepartialUpdatedeleteBuilt by developers at Clock.
Licensed under the ISC
FAQs
Build an HTTP API for a crud-service
We found that @clocklimited/cf-crud-service-api-builder demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.