Function createSwaggerStatSettings

  • Used to setup an IHttpServer instance, to return statistics about its Swagger documentation.

    Returns ICreateSwaggerStatSettingsResult

    Settings for the IHttpServer.contoller method.

    Example

    import createServer, { createSwaggerStatSettings } from '@egomobile/http-server'

    const app = createServer()

    const {
    handler: statsHandler,
    onControllerMethodInitialized
    } = createSwaggerStatSettings()

    app.controllers({
    onControllerMethodInitialized
    })

    app.get('/swagger-stats', statsHandler)

    app.listen()
    .catch(console.error)

Generated using TypeDoc