Verified Commit b309b9d4 authored by Sebastiaan Deckers's avatar Sebastiaan Deckers 馃悜

fix: always force mongo client to close

parent 3215c9c3
......@@ -40,7 +40,10 @@ module.exports = async (configuration) => {
fastify.addHook('preHandler', require('./hooks/normaliseDomain'))
fastify.register(require('./plugins/jwt'), configuration.jwt)
fastify.register(require('./plugins/auth0'), configuration.auth0)
fastify.register(require('fastify-mongodb'), configuration.mongodb)
fastify.register(
require('fastify-mongodb'),
{ ...configuration.mongodb, forceClose: true }
)
fastify.register(require('./plugins/pubnub'), configuration.pubnub)
fastify.register(require('./plugins/acme'), configuration.acme)
fastify.use(require('cors')())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment