iut-hapi/server/plugins/swagger.js

26 lines
586 B
JavaScript
Raw Normal View History

2024-01-26 13:38:28 +00:00
'use strict';
const Inert = require('@hapi/inert');
const Vision = require('@hapi/vision');
const HapiSwagger = require('hapi-swagger');
const Package = require('../../package.json');
module.exports = {
name: 'app-swagger',
async register(server) {
await server.register([
Inert,
Vision,
{
plugin: HapiSwagger,
options: {
info: {
version: Package.version
}
}
}
]);
}
};