koajs / discussions

KoaJS Discussions
2 stars 2 forks source link

Express / Connect interoperability / compatibility #20

Open buschtoens opened 5 years ago

buschtoens commented 5 years ago

Related issues from the graveyard: https://github.com/koajs/koa/issues/71, https://github.com/koajs/koa/pull/74

I kind of expected to be able to mount a koa app in an express app.

You currently can only do the following:

expressApp.use('/some-path', koaApp.callback());

But this then fully takes over /some-path. There is no way to call next in the koaApp and yield back to the expressApp.

Do you think this is a feature that we could and should support?

buschtoens commented 5 years ago

My motivation for this is that I am developing a middleware / plugin (verdaccio-oidc) for Verdaccio, which unfortunately is based on Express. I'd love to use koa for this though.