Using the official MongoDB NodeJS driver (mongodb package) here.
A nice detail: the code example on Mongo website shows how to cache and reuse the DB connection.
Also, an interesting alternative here: vercel/next.js#12229
Using the official MongoDB NodeJS driver (mongodb package) here.
A nice detail: the code example on Mongo website shows how to cache and reuse the DB connection.
Also, an interesting alternative here: vercel/next.js#12229