Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在快递中,我们有这样的路线:-
app.get("/route1", function(req, res, next){ ... }
Fastify 框架中的等效语句是什么(下一部分很重要)?
相当于:
app.get('/route1', function(request, reply) { ... }
Fastify自定义对象的位置request和位置。reply
request
reply
没有,next因为在 Fastify 中没有中间件链,但是有一个请求的生命周期的概念,你可以用钩子自定义
next