UNPKG

fastify-swagger

Version:

Serve Swagger/OpenAPI documentation for Fastify, supporting dynamic generation

17 lines (13 loc) 296 B
'use strict' const fastify = require('fastify')() fastify.register(require('../index'), { mode: 'static', specification: { path: './examples/example-static-specification.yaml' }, exposeRoute: true }) fastify.listen(3000, err => { if (err) throw err console.log('listening') })