Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
274 views
in Technique[技术] by (71.8m points)

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

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!

question from:https://stackoverflow.com/questions/65601008/what-determines-whether-a-middleware-is-connect-compatible-or-not

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...