Re:Ask HN: Which TypeScript codebase should I study to get b...
by greenscale on Thursday November 09, 2017 @11:45AM
(#15663844)
+1 for InversifyJS - I learned a lot of TypeScript by just reading through the actual Inversify codebase, and then used what I learned to write what would become https://github.com/inversify/inversify-express-utils.
Also, thanks to the Inversify contributors for continuing to maintain and improve express-utils!
Re:Ask HN: Which TypeScript codebase should I study to get b...
by dvlsg on Thursday November 09, 2017 @06:56PM
(#15666803)
+1 for InversifyJS from me too. I've also been looking at the inversify express utils lately -- loving it so far!
Do you know if there are any plans for allowing the http context (req, namely) to be injected into services? Similar to the IHttpContextAccessor in dotnet core?
I have some use cases for using pieces of the http context (headers) to instantiate some transient services. I started putting together my own pieces to see what I could get away with. Looks like it works okay, but I had to create a new container per request, using the `Container.parent` to link them.
Re:Ask HN: Which TypeScript codebase should I study to get b...
by remojansen on Friday November 10, 2017 @04:14AM
(#15668798)
This should be possible now. You can implement by yourself as described at https://twitter.com/RemoHJansen/status/927542673682116611. I have already started to think about a way to add this into the inversify-express-utils but I have to think it well so it can support all kinds of auth.
Re:Ask HN: Which TypeScript codebase should I study to get b...
by ower89 on Friday November 10, 2017 @09:52PM
(#15674738)
HttpContext is now available in [email protected] https://github.com/inversify/inversify-express-utils#httpcon... :)
1. InversifyJS - DI in Typescript / JS
https://github.com/inversify/InversifyJS
2. TypeORM - as it says, might be the best ORM for nodejs projects:
https://github.com/typeorm/typeorm
3. Searchkit - ES web frontend - react + typescript
https://github.com/searchkit/searchkit