https://github.com/nbalduzzi/fastify-knexjs
Fastify KnexJS Plugin
https://github.com/nbalduzzi/fastify-knexjs
Last synced: 12 months ago
JSON representation
Fastify KnexJS Plugin
- Host: GitHub
- URL: https://github.com/nbalduzzi/fastify-knexjs
- Owner: nbalduzzi
- License: mit
- Created: 2017-11-09T16:00:17.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-23T07:03:05.000Z (about 3 years ago)
- Last Synced: 2024-11-09T14:49:13.268Z (over 1 year ago)
- Language: JavaScript
- Size: 574 KB
- Stars: 28
- Watchers: 3
- Forks: 14
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-fastify - `fastify-knexjs`
README
# Fastify KnexJS Plugin


[](https://standardjs.com)
[](https://github.com/semantic-release/semantic-release)
[](https://nodei.co/npm/fastify-knexjs/)
## Installation
```bash
npm install fastify-knexjs --save
```
## Usage
```javascript
fastify.register(require('fastify-knexjs'), options, (err) =>
console.error(err)
);
fastify.get('/', (request, reply) => {
console.log(fastify.knex); // Knex DB instance
});
```
## Options
KnexJS client DB configuration JSON object.
## Author
[Nicolás Balduzzi](nico.balduzzi@gmail.com)
## Contributors
[Patrick Heneise](https://github.com/PatrickHeneise)
## License
Licensed under [MIT](./LICENSE).