You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP

@payloadcms/db-mongodb

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
p

@payloadcms/db-mongodb

The officially supported MongoDB database adapter for Payload

3.41.0-internal.8617025
99

Supply Chain Security

100

Vulnerability

80

Quality

100

Maintenance

100

License

Version published
Weekly downloads
37K
-4.15%
Maintainers
9
Weekly downloads
 
Created
Issues
705

Payload MongoDB Adapter

Official MongoDB adapter for Payload.

Installation

npm install @payloadcms/db-mongodb

Usage

import { buildConfig } from 'payload'
import { mongooseAdapter } from '@payloadcms/db-mongodb'

export default buildConfig({
  db: mongooseAdapter({
    url: process.env.DATABASE_URI,
  }),
  // ...rest of config
})

More detailed usage can be found in the Payload Docs.

FAQs

Package last updated on 03 Jun 2025

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