INNER CODE UNIT · JavaScript

fastifyMongodb

fastify/fastify-mongodb · index.js:44

async function fastifyMongodb (fastify, options) {
  options = Object.assign({
    serverSelectionTimeoutMS: 7500
  }, options)
  const { forceClose, name, database, url, client, ...opts } = options

  if (client) {
    decorateFastifyInstance(fastify, client, {
      newClient: false,
      forceClose,
      database,
      name
    })
  } else {
    if (!url) {
      throw Error('`url` parameter is mandatory if no client is provided')
    }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…