monglow
A simple MongoDB wrapper that doesn't get in your way.
- Easy & flexible database setup
- Command buffering (query without waiting for connection)
- Promises built-in
- Direct access to native MongoDB driver
- Serverless friendly
- Typescript support
npm i --save monglow
Usage
; ;; ; /** * You can activate and use your models at any point in the code and * Monglow will automatically handle the connection process */monglow.activateUser; User.find.then; // Direct access to MongoDB driverUser.collection.thenc.find.count; // You can also activate models with connectAndActivate so// you don't need to run connect at the start of the code.monglow.connectAndActivateUser;// Note: this function can be called many times without// any problems, the database will only connect once per instance of Monglow monglow.connect; ////// Do some things//// monglow.close;