Files
simple-mail-cleaner/backend/node_modules/@fastify/swagger-ui/examples/static-json-file.js
2026-01-22 15:49:12 +01:00

22 lines
486 B
JavaScript

'use strict'
const Fastify = require('fastify')
; (async () => {
const fastify = Fastify({ logger: true })
await fastify.register(require('@fastify/swagger'), {
mode: 'static',
specification: {
path: './examples/example-static-specification.json'
}
})
await fastify.register(require('../index'))
fastify.listen({ port: 3000 }, (err, addr) => {
if (err) throw err
fastify.log.info(`Visit the documentation at ${addr}/documentation/`)
})
})()