npm

Bring the best of OSS JavaScript development to your projects with npm Orgs - private packages & team management tools.Learn more »

@keystone-alpha/adapter-mongoose

2.0.1 • Public • Published

section: packages title: Database Adapter - Mongoose

Mongoose Database Adapter

Usage

const { MongooseAdapter } = require('@keystonejs/adapter-mongoose');
 
const keystone = new Keystone({
  name: 'My Awesome Project',
  adapter: new MongooseAdapter(),
});
 
const mongooseOptions = {
  /* .. */
};
const mongoDbUri = '';
 
keystone.connect(mongoDbUri, mongooseOptions);

API

mongoDbUri

Default: 'mongodb://localhost:27017/${SAFE_KEYSTONE_NAME}'

This URI will be passed directly to Mongoose (and hence MongoDB) as the location of the database.

mongooseOptions

mongooseOptions.*

All other options are passed directly to Mongoose.

See the Mongoose docs for more.

Keywords

none

install

npm i @keystone-alpha/adapter-mongoose

Downloadsweekly downloads

81

version

2.0.1

license

MIT

last publish

collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
Report a vulnerability