New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@keystonejs/adapter-mongoose

Package Overview
Dependencies
Maintainers
7
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@keystonejs/adapter-mongoose

KeystoneJS Mongoose Database adapter.

11.2.2
latest
Source
npm
Version published
Weekly downloads
378
-23.17%
Maintainers
7
Weekly downloads
 
Created
Source

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.

View changelog

Usage

const { MongooseAdapter } = require('@keystonejs/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_TO
  • DATABASE_URL
  • MONGO_URI
  • MONGODB_URI
  • MONGO_URL
  • MONGODB_URL
  • MONGOLAB_URI
  • MONGOLAB_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.

FAQs

Package last updated on 26 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts