Projektstart
This commit is contained in:
21
backend/node_modules/@fastify/swagger-ui/examples/static-json-file.js
generated
vendored
Normal file
21
backend/node_modules/@fastify/swagger-ui/examples/static-json-file.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
'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/`)
|
||||
})
|
||||
})()
|
||||
Reference in New Issue
Block a user