You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
555 B
24 lines
555 B
'use strict'
|
|
|
|
const path = require('path')
|
|
const AutoLoad = require('fastify-autoload')
|
|
|
|
|
|
module.exports = async function (fastify, opts) {
|
|
|
|
fastify.register(require('fastify-static'), {
|
|
root: path.join(__dirname, 'public'),
|
|
prefix: '/', // optional: default '/'
|
|
})
|
|
// Place here your custom code!
|
|
|
|
// Do not touch the following lines
|
|
|
|
|
|
// This loads all plugins defined in routes
|
|
// define your routes in one of these
|
|
fastify.register(AutoLoad, {
|
|
dir: path.join(__dirname, 'routes'),
|
|
options: Object.assign({}, opts)
|
|
})
|
|
}
|
|
|