Skip to content

Latest commit

 

History

History
20 lines (13 loc) · 452 Bytes

README.md

File metadata and controls

20 lines (13 loc) · 452 Bytes

MongoNow

Tiny wrapper around the MongoDB driver to allow immediate usage of database commands without needing to store state or wrap everything in a callback.

Installation

$ npm i mongonow

Usage

const client = require("mongonow")(url) // replace url with your MongoDB url

// you can now use mongodb as usual:

const db = client.db("mydatabase")
db.collection("users").find().toArray().then(users => console.log(users))