@xplora-uk/express-ajv-knex
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

express-ajv-knex

tools (using express, ajv, knex) to work with OpenAPI (JSON Schemas) and create simple RESTful resources for SQL databases

requirements

  • Node v18.16.0+

usage

npm i @xplora-uk/express-ajv-knex

See ./example/src

maintenance

installation

npm i

code

src/
  __tests__/
    unit/                 unit tests
  ajv/                    load ajv lib
  express/                controller and validator for express app
  knex/                   db classes to support controller
  open-api/               use schemas from api spec for json schema validation
  utils/                  utility functions
  index.ts                main file that exports features of this library

build

npm run build

tests

You can run tests with/without coverage info.

npm run test:unit
npm run test:coverage

publish

It is important to increment version number using semantic versioning in package.json and re-create package-lock.json

# https://docs.npmjs.com/cli/v9/commands/npm-login
# using a member in xplora-uk
npm login

# https://docs.npmjs.com/cli/v9/commands/npm-publish
npm publish --access public

Package Sidebar

Install

npm i @xplora-uk/express-ajv-knex

Weekly Downloads

9

Version

1.0.1

License

MIT

Unpacked Size

48.7 kB

Total Files

41

Last publish

Collaborators

  • nbxplora
  • ark8
  • haci-xplora