📜  fastify 查询 - 任何代码示例

📅  最后修改于: 2022-03-11 14:55:53.233000             🧑  作者: Mango

代码示例1
fastify.route({
  method: 'GET',
  url: '/',
  { constraints: { host: /.*\.fastify\.io/ } }, // will match any subdomain of fastify.io
  handler: function (request, reply) {
    reply.send('hello world from ' + request.headers.host)
  }
})