8.1.3 • Published 5 years ago
@koikorn/adapter-mongoose v8.1.3
Mongoose database adapter
Usage
const { MongooseAdapter } = require('@koikorn/adapter-mongoose');
const keystone = new Keystone({
adapter: new MongooseAdapter({...}),
});Config
mongoUri (required)
This is used as the uri parameter for mongoose.connect().
Default: Environment variable (see below) or 'mongodb://localhost/<DATABASE_NAME>'
If not specified, KeystoneJS will look for one of the following environment variables:
CONNECT_TODATABASE_URLMONGO_URIMONGODB_URIMONGO_URLMONGODB_URLMONGOLAB_URIMONGOLAB_URL
Mongoose options (optional)
Additional Mongoose config options are passed directly through to mongoose.connect().
Default:
{
useNewUrlParser: true,
useFindAndModify: false,
useUnifiedTopology: true,
}See the Mongoose docs for a detailed list of options.
8.1.3
5 years ago