typemongo
v0.0.1-canary-11
Published
A Typescript based generic MongoDB Repository
Downloads
4
Readme
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
*/
}