What determines whether a middleware is "connect-compatible" or not?

Viewed 54

Recently while traversing through the Next.js docs, specifically middleware for API routes, it states the following:

You can also use Connect compatible middleware.

I'm not too familiar with express/connect, so I'm wondering what makes a piece of middleware connect compatible? It doesn't seem to be something that is called out in the docs of middleware specifically. Is there a certain signature that applies? Or is this related to Node.js and the (req, res) pattern?

Any insight would be greatly appreciated! Thanks!

0 Answers
Related