26 lines
561 B
JavaScript
26 lines
561 B
JavaScript
'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
|
|
}
|
|
}
|
|
}
|
|
]);
|
|
}
|
|
};
|