page cw
This commit is contained in:
12
plugins/support.js
Normal file
12
plugins/support.js
Normal file
@@ -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'
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user