npm.io
0.0.1-canary-11 • Published 7 years ago

typemongo

Licence
MIT
Version
0.0.1-canary-11
Deps
4
Size
56 kB
Vulns
0
Weekly
0
Stars
1

TypeMongo [Work in Progress] [Unstable]

A generic MongoDB repository for Typescript.

Introduction

MongoDB business logic written solely with native driver can quickly pile up a lot boilerplate code. Most of it can be reused with generics and developing a generic repository that gets inherited by specific repositories.

There are other alternatives like Mongoose, Mongolia which tackle reducing the bolierplate with different approaches.

TypeMongo solves it with Repository Pattern.

import { MongoRepository } from 'typemongo'
class MyRepository extends MongoRepository {
    constructor(){
        super()
    }

    /*
        MY REPO SPECIFIC METHODS HERE
    */
}