Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Support for Koa Middleware #20

Open
Lichtjaeger opened this issue Feb 26, 2018 · 2 comments
Open

Feature Request: Support for Koa Middleware #20

Lichtjaeger opened this issue Feb 26, 2018 · 2 comments

Comments

@Lichtjaeger
Copy link

Hi,

It would be very nice if there would be a middleware handler for koa like you did it with spirit-express.

@hnry
Copy link
Collaborator

hnry commented Feb 26, 2018

Sure, is koa2 only reasonable? koa2 seems very similar in design (bidirectional, flows upstream and downstream just like spirit).

Any particular koa2 middleware you were looking at? Or can you name some popular must-have ones? This is just so I can use them to test against. For example for express compatibility there were some popular middlewares that did some hacky stuff to work and I had to account for it.

@Lichtjaeger
Copy link
Author

Yes, we should focus on koa2. I came up with it because of this article. The first implementation of the Aurelia server-side rendering middleware will be for koa2. I also failed to make oidc-provider work with spirit-express. It is itself a koa2 middleware/server with express compatibility. I would assume that it works better as a koa middleware.

I originally started with express and do working with domain sessions. So I am dependent on the express-session middleware (or full compatible alternatives). Therefore I don't have much experience with koa2 and its middleware.

But the ability to use and mix the best of the express and koa2 worlds would be a big plus for spirit.

PS: The middleware I usually use in my express apps are serve-favicon, helmet, cors, multer, and compression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants