0.1.3 • Published 4 years ago
@devhsoj/mango v0.1.3
Mango
Mango is a simple, easy to use MongoDB client wrapper Check it out on npm!
Installation
npm i @devhsoj/mango
Example Usage
const Mango = require('@devhsoj/mango');
const cli = new Mango('mongodb://localhost:27017',{
db:'test',
collection:'test'
});
cli.insert({msg:'Hello World!'})
.then(result => console.log(result))
.catch(err => console.error(err));
Why Mango?
I use MongoDB all the time, it's easy to use, very simple, and fast to develop with. However, when using the standard mongodb npm package they have, it feels counterintuitive to use it. I run in to the same problems every time:
- I'm writing too much code for simple usage
- I'm writing redundant code and error handling
- I have to write workarounds for mongodb to make it more modern (promises, async/await, etc...)
So I wrote Mango to solve these problems and to do all the heavy lifting for you without compromising extensibility.
Note
Mango is still under heavy development, and is brand new. Documentation will be released shortly and expect a lot of changes.