title: What determines whether a middleware is "connect-compatible" or not?
body: <p>Recently while traversing through the Next.js docs, specifically <a href="https://nextjs.org/docs/api-routes/api-middlewares#connectexpress-middleware-support" rel="nofollow noreferrer">middleware for API routes</a>, it states the following:</p>
  <blockquote>
  <p>You can also use Connect compatible middleware.</p>
  </blockquote>
  <p>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?</p>
  <p>Any insight would be greatly appreciated! Thanks!</p>