0.1.1 • Published 6 years ago

mongo-container v0.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

A simple container for MongoDB with support for async await using Promises

Usage:

import { MongoContainer, createRepository } from 'mongo-container';

const mongoContainer = new MongoContainer(
    {
        database : {
            uri : 'mongodb://127.0.0.1:27017',
            name : 'my-database'
        }
    }
);

const myRepository = createRepository(
    mongoContainer,
    'my-collection'
);

let item = await myRepository.addOne({
    test : 'test'
});

let foundItem = await myRepository.findOne({
    test : 'test'
});

myRepository.deleteOne({
    test : 'test'
});
0.1.1

6 years ago

0.1.0

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

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