UNPKG

fastify-cli

Version:

Run a fastify route with one command!

13 lines (11 loc) 278 B
'use strict' module.exports = function (fastify, options, next) { fastify.decorate('test', true) fastify.get('/', function (req, reply) { reply.send({ hello: 'world' }) }) fastify.post('/', function (req, reply) { reply.send({ hello: 'world' }) }) next() }