dimanche 21 décembre 2014

Repository pattern in NodeJS Mongo DB


Hi I am New to NodeJS and starting a new project on MongoDB + NodeJS stack to create a RESTful web API.


I am trying to learn what is the standard way to do test driven development of nodejs Business logic code, and how you isolate db-repository modules so that you can mock/fake mongodb database calls or Repository? Do we have any example applications on Github on this.


I am stuck with "How repository module should be created in nodejs, as I assume, repository should be created only once during the lifetime of server-side web application." so that we can write unit test cases for controller and other business modules.


Does anyone have created reference example applications or any pointers would help me get going.





Aucun commentaire:

Enregistrer un commentaire