fastify-ui
v1.0.4
Published
Makes adding an API UI to your Fastify project a breeze.
Downloads
1
Readme
fastify-ui
Makes adding an API UI to your Fastify project a breeze.
Example
const fastifyUI = require("fastify-ui");
const packageDefinition = require("../package.json");
function installApiUI(fastify) {
fastify.register(fastifyUI, {
config: {
info: {
title: packageDefinition.name || null,
description: packageDefinition.description || null,
version: packageDefinition.version || null
},
servers: [
{
url: "http://localhost:3000"
}
],
components: {
securitySchemes: {
bearerAuth: {
type: "http",
scheme: "bearer"
}
}
}
}
});
}
module.exports = installApiUI;