Chapter 11: update example microservice

This commit is contained in:
Beth Griggs
2020-11-15 01:11:41 +00:00
parent 791aac76d7
commit cb0e52e541
11 changed files with 146 additions and 9 deletions
@@ -0,0 +1,12 @@
'use strict'
const fp = require('fastify-plugin')
// the use of fastify-plugin is required to be able
// to export the decorators to the outer scope
module.exports = fp(async function (fastify, opts) {
fastify.decorate('someSupport', function () {
return 'hugs'
})
})