2.1.0 • Published 2 years ago

@geekson/mongodb-connector v2.1.0

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

mongodb-connector

A simple, yet useful, mongoDB connector.

npm

Install

npm install @geekson/mongodb-connector

Usage

Ensure to have a .env file with the following properties: MONGODB_URI: the URI to connect to MONGODB_DB: the database to connect to

import { connectToDatabase } from '@geekson/mongodb-connector';

async getAllPosts() {
    const { db } = await connectToDatabase();

    return await db.collection('Post').find().toArray();
}

Changelog

2021-12-04
Updated version of underlying library (mongodb).
Please refer to this page for instructions (many changes).

2.1.0

2 years ago

2.0.0

2 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago