From 49057fa13ce82342cb87a344f58406739423b99d Mon Sep 17 00:00:00 2001 From: moander Date: Sun, 16 Aug 2020 01:21:55 +0200 Subject: [PATCH] Updated connect example to avoid deprecation warnings --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e6e3914f702..0da1d48835c 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,9 @@ Both `connect` and `createConnection` take a `mongodb://` URI, or the parameters ```js await mongoose.connect('mongodb://localhost/my_database', { useNewUrlParser: true, - useUnifiedTopology: true + useUnifiedTopology: true, + useFindAndModify: false, + useCreateIndex: true }); ```