1.0.10 • Published 6 years ago

@tsq/api-factory v1.0.10

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

api-factory

npm.io

a api tool for Node.js

Install

npm i @tsq/api-factory

Usage

const apiFactory = require('@tsq/api-factory');

router
  .route('/')
  .get(apiFactory.getAll(User))
  .post(apiFactory.createOne(User));

router
  .route('/:id')
  .get(checkId(User), apiFactory.getOne(User))
  .put(checkId(User), apiFactory.updateOne(User))
  .delete(checkId(User), apiFactory.deleteOne(User));

Dependencies

  • tsq-a/check-id
  • tsq-a/express-response
1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago