fastify-knexjs
Version:
Fastify KnexJS Plugin
45 lines (28 loc) • 1.17 kB
Markdown
# 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.
<http://knexjs.org/#Installation-client>
## Author
[Nicolás Balduzzi](nico.balduzzi@gmail.com)
## Contributors
[Patrick Heneise](https://github.com/PatrickHeneise)
## License
Licensed under [MIT](./LICENSE).