fix: new mongo parser

This commit is contained in:
Wyatt Johnson
2018-07-13 16:33:00 -06:00
parent b6305bec16
commit 34ddd2ea0b
2 changed files with 6 additions and 3 deletions
+4 -1
View File
@@ -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.