BlackBoxVision/typescript-hapi-starter

Add support for TypeORM

JonatanSalas opened this issue · 5 comments

Add support for TypeORM

Do you have a checklist of features that you're looking to get out of typeorm? I've been poking around with this the last few days and I would be willing to help out if I can.

@jcloutz from another private project that I have developed, I have a set of abstractions that I want to integrate to typescript-hapi-starter. But I want to do it in a separate branch, my idea is to use the cli create-typescript-api to select which kind of project would you mind to start, and have a super simple api. I don't want to add any boilerplate, only simple setup and a set of constraints so every developer that uses it can start easily.

@JonatanSalas sorry for the long delay in responding back, I've been out of town. I don't know the details about what you've done, but what would you think about hiding the repositories and behind interfaces and using a dependency injection container? It would make things fairly easy to swap out for testing if need be, but also allow for easy integration of other persistence libraries such as redis, rethink, couchdb etc..

It would be a really good thing. I didn't use yet dependency injection in TypeScript, but for testing purposes it would be a really nice to have. In this way we can decouple the way how everything works. If you want you can create a PR and I will review and approve it.

Excuse if I don't put my hands in the code, but I'm covered of work now. In a few days I will be free.

I'll look into it, I haven't used it in typescript either but it is a good way to keep things decoupled.