package
Fastify plugin for OAuth2.0
npm install @kakang/fastify-oauth2GitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
This plugin helps you to register mongodb client to fastify,
and it also provide some utilities to ease the usage of mongodb.
You can checkout @fastify/mongodb if you prefer offcial plugin.
npm install @kakang/fastify-mongodb mongodb --save
yarn add @kakang/fastify-mongodb mongodbimport fastifyMongoDB from '@kakang/fastify-mongodb'
fastify.register(fastifyMongoDB, {
url: 'mongodb://127.0.0.1:27017',
database: 'foobar',
options: {} // MongoClient options
})
fastify.post('/', async function(request, reply) {
// insertion
await fastify.mongodb.db.collection('foo').insertOne(request.body)
// auto managed transaction
const result = await fastify.mongodb.withTransaction(async (session) => {
const result = await fastify.mongodb.db.collection('foo'
The URL of mongodb server.
The database name you would like to use.
Options passed to MongoClient.
Estimated unpacked size across 31 packages.
3.4 MB
Includes dependencies.
5 direct · 3 outdated
^5.9.3
6.2.17
^4.0.5
6.3.6
^5.1.0
5.1.0
^5.0.1
6.0.1
^5.0.7
5.0.8