Skip to content

Commit

Permalink
sample usage code fixed (#4128)
Browse files Browse the repository at this point in the history
  • Loading branch information
indatawetrust committed Jul 10, 2022
1 parent 5fe883e commit cf091f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/Guides/Database.md
Expand Up @@ -204,7 +204,7 @@ function knexPlugin(fastify, options, done) {
done()
}

export default fp(plugin, { name: 'fastify-knex-example' })
export default fp(knexPlugin, { name: 'fastify-knex-example' })
```

### Writing a plugin for a database engine
Expand All @@ -213,7 +213,7 @@ In this example, we will create a basic Fastify MySQL plugin from scratch (it is
a stripped-down example, please use the official plugin in production).

```javascript
const fp = require('fp')
const fp = require('fastify-plugin')
const mysql = require('mysql2/promise')

function fastifyMysql(fastify, options, done) {
Expand Down

0 comments on commit cf091f7

Please sign in to comment.