26 lines
523 B
TypeScript
26 lines
523 B
TypeScript
// @ts-nocheck
|
|
import { Server } from '@hapi/hapi';
|
|
|
|
const version = require('../../package.json').version;
|
|
|
|
export default async (server: Server) => {
|
|
return server.register([
|
|
require('@hapi/inert'),
|
|
require('@hapi/vision'),
|
|
{
|
|
plugin: require('hapi-swagger'),
|
|
options: {
|
|
info: {
|
|
title: 'Many API',
|
|
version,
|
|
},
|
|
swaggerUI: true,
|
|
documentationPage: true,
|
|
documentationPath: '/swagger',
|
|
pathPrefixSize: 3,
|
|
basePath: '/api/v1',
|
|
reuseDefinitions: false,
|
|
},
|
|
},
|
|
]);
|
|
};
|