fastify-cli
Version:
Run a fastify route with one command!
18 lines (14 loc) • 362 B
JavaScript
module.exports = function (fastify, opts, next) {
fastify.get('/', function (request, reply) {
reply.send({ root: true })
})
next()
}
// It you prefer async/await, use the following
//
// module.exports = async function (fastify, opts) {
// fastify.get('/', async function (request, reply) {
// return { root: true }
// })
// }