DenisFrezzato / hyper-ts

Type safe middleware architecture for HTTP servers
https://denisfrezzato.github.io/hyper-ts/
MIT License
391 stars 18 forks source link

Koa support / example ? #22

Open medfreeman opened 4 years ago

medfreeman commented 4 years ago

Hi, thanks for your amazing work !

I gather you removed support for koa in a previous release. Would you know what is required / in which direction to go in order to add koa support back ?

Or if possible as-is, would you give a simple example of using hyper-ts middleware chaining on koa ?

The definitelytyped types for koa don't really support middleware type transformation, the goal being to at least enforce order pertaining to dependencies on previous middlewares.

gcanti commented 4 years ago

@medfreeman Koa support was added by @leemhenson in v0.3, unfortunately I'm not acquainted with Koa so I removed its support in the last refactoring (I can't maintain other adapters other than express in the core).

medfreeman commented 4 years ago

Thank you! i'll try to create the adapter in my spare time. There's a lot of resources to help in the relevant 0.3 PRs.

krishnagopinath commented 3 years ago

@medfreeman were you able to create an adapter for Koa? Thank you!