Netzo Logo

mongodb

MongoDB is a general purpose, document-based, distributed database built for modern application developers and for the cloud era.

Usage

import { mongodb } from 'netzo/databases/mongodb.ts'

const db = mongodb({
  url: Deno.env.get('MONGODB_URL'),
  database: Deno.env.get('MONGODB_DATABASE'),
})

Configuration

The mongodb factory function expects an object with the following, and returns an object with a database client db.

ParamTypeDefaultDescription
urlstringDeno.env.get('MONGODB_URL')the connection string URL to the MongoDB instance
databasestringDeno.env.get('MONGODB_DATABASE')the name of the database to use
Refer to official database driver documentation for more information.

Examples

Coming soon...

References