Use Koa middlewares with Nextjs api routes.
yarn add koa-nextjs-compat
import KoaCompat from "koa-nextjs-compat";
const app = new KoaCompat().use((ctx, next) => {
ctx.body = "Hello world! 👋🏽";
});
export default app.handle();
We're open to all community contributions! If you'd like to contribute in any way.
MIT