typescript-hapi-starter icon indicating copy to clipboard operation
typescript-hapi-starter copied to clipboard

Add support for TypeORM

Open JonatanSalas opened this issue 8 years ago • 5 comments

JonatanSalas avatar Jul 01 '17 17:07 JonatanSalas

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 avatar Nov 30 '17 14:11 jcloutz

@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 avatar Dec 01 '17 00:12 JonatanSalas

@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..

jcloutz avatar Dec 04 '17 19:12 jcloutz

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.

JonatanSalas avatar Dec 04 '17 21:12 JonatanSalas

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

jcloutz avatar Dec 08 '17 04:12 jcloutz