KeystoneJS Mongoose Database adapter.
> This is the last active development release of this package as Keystone 5 is now in a 6 to 12 month active maintenance phase. For more information please read our Keystone 5 and beyond post.

``javascript
const { MongooseAdapter } = require('@keystonejs/adapter-mongoose');
const keystone = new Keystone({
adapter: new MongooseAdapter({...}),
});
`
This is used as the uri parameter for mongoose.connect().
_Default:_ Environment variable (see below) or 'mongodb://localhost/
If not specified, KeystoneJS will look for one of the following environment variables:
- CONNECT_TODATABASE_URL
- MONGO_URI
- MONGODB_URI
- MONGO_URL
- MONGODB_URL
- MONGOLAB_URI
- MONGOLAB_URL
-
Additional Mongoose config options are passed directly through to mongoose.connect().
_Default:_
`javascript``
{
useNewUrlParser: true,
useFindAndModify: false,
useUnifiedTopology: true,
}
See the Mongoose docs for a detailed list of options.