0.0.17 • Published 5 years ago
@yevheni/mangodb v0.0.17
MangoDB
Installation
npm install --save @yevheni/mangodb
Usage
const MangoDB = require("@yevheni/mangodb").MangoDB;
// or
import {MangoDB} from "@yevheni/mangodb";
const mango = new MangoDB("mongodb://localhost:27017/mango", {
useNewUrlParser: true
});
mango.collection("test").create({
test: true
}).then(test => {
// do something
}).catch(err => console.error(err));
Reference
new MangoDB(url, options)
- url:
String
MongoDB connection url (see mongoose docs)
- options:
Object
MongoDB connection options (see mongoose docs)
collection(name)
- name:
String
Collection name. Returns Mongoose Model
drop()
Drops database. Returns Promise and resolves after drop success
connection
Returns Mongoose Connection
0.0.17
5 years ago
0.0.16
5 years ago
0.0.15
6 years ago
0.0.14
6 years ago
0.0.13
6 years ago
0.0.12
6 years ago
0.0.11
6 years ago
0.0.10
6 years ago
0.0.9
6 years ago
0.0.8
6 years ago
0.0.7
6 years ago
0.0.6
6 years ago
0.0.5-alpha1
6 years ago
0.0.5
6 years ago
0.0.4-a1
6 years ago
0.0.4
6 years ago
0.0.3
6 years ago
0.0.2
6 years ago
0.0.1
6 years ago