MongoDB has two connection string formats.
The old format is now deprecated and uses an old URL format. There are mongodb+srv://
URLs, and simple mongodb://
URLs. If you are using the new format (you probably are by default), the new URL parser drops support for the old style urls.
useCreateIndex
: Again previously MongoDB used an ensureIndex
function call to ensure that Indexes exist and, if they didn't, to create one.
This too was deprecated in favour of createIndex
. the useCreateIndex
option ensures that you are using the new function calls.
Reference:
https://mongoosejs.com/docs/connections.html#options
https://mongoosejs.com/docs/deprecations.html