Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sample usage code fixed #4128

Merged
merged 2 commits into from Jul 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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