UNPKG

@fastify/autoload

Version:
15 lines (11 loc) 270 B
'use strict' const path = require('node:path') const autoLoad = require('../../../') module.exports = function (fastify, opts, next) { fastify.register(autoLoad, { dir: path.join(__dirname, 'routes'), autoHooks: true, cascadeHooks: true }) next() }