fastify-cli
Version:
Run a fastify route with one command!
15 lines (13 loc) • 332 B
JavaScript
module.exports = function (fastify, options, next) {
fastify.decorate('test', true)
fastify.get('/', function (req, reply) {
req.log.trace('trace')
req.log.debug('debug')
reply.send({ hello: 'world' })
})
fastify.post('/', function (req, reply) {
reply.send({ hello: 'world' })
})
next()
}