mirror of
https://github.com/wassname/talk.git
synced 2026-08-16 11:29:31 +08:00
fix: new mongo parser
This commit is contained in:
@@ -8,7 +8,10 @@ import { Config } from "talk-server/config";
|
||||
*/
|
||||
export async function createMongoDB(config: Config): Promise<Db> {
|
||||
// Connect and create a client for MongoDB.
|
||||
const client = await MongoClient.connect(config.get("mongodb"));
|
||||
const client = await MongoClient.connect(
|
||||
config.get("mongodb"),
|
||||
{ useNewUrlParser: true }
|
||||
);
|
||||
|
||||
// Return the database handle, which defaults to the database name provided
|
||||
// in the config connection string.
|
||||
|
||||
Reference in New Issue
Block a user