Monk was abandoned in 2021, and it keeps BrainBox (and other of our apps) stuck with an old version of MongoDB.
We replace it from a more standard approach. Maybe the safest would be to have both Monk and the native mongodb driver coexisting for a period, and replace the uses of monk little by little. Like:
// Existing monk setup (unchanged)
const monk = require('monk');
const monkDb = monk(connectionString);
// New native driver setup
const { MongoClient } = require('mongodb');
const client = new MongoClient(connectionString);
await client.connect();
const nativeDb = client.db(); // database name comes from the URI
Monk was abandoned in 2021, and it keeps BrainBox (and other of our apps) stuck with an old version of MongoDB.
We replace it from a more standard approach. Maybe the safest would be to have both Monk and the native mongodb driver coexisting for a period, and replace the uses of monk little by little. Like: