0.1.1 • Published 7 years ago

mongo-container v0.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
7 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

7 years ago

0.1.0

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago