openapi-connect
Version:
Base for microservices around OpenAPI/Swagger
28 lines (27 loc) • 1.29 kB
TypeScript
/// <reference types="node" />
import * as http from 'http';
import * as health from './middleware/health';
import * as logging from './middleware/logging';
import { getOptions, IOptions } from './options';
import './types';
export * from '@targetprocess/swagger-tools';
export { CorsOptions } from 'cors';
export { ErrorHandleFunction, NextHandleFunction } from 'connect';
export { send } from './helpers/response';
export { HttpError } from './HttpError';
export { IMiddlewareOptions, IOptions, IOptionsWithDefaults, IMetricsOptions } from './options';
export { getOptions };
export declare const handlers: Readonly<{
errorHandling: (err: any, req: any, res: http.ServerResponse, next: any) => void;
errorLogging: typeof logging.errorLogging;
requestLogging: typeof logging.requestLogging;
health: (req: any, res: any, next: any) => any;
oauth: (options: import("./middleware/oauth").IOptions) => (req: any, res: any, next: any) => any;
}>;
export { ICustomMiddleware } from './middleware/core/customMiddleware';
export declare const middleware: Readonly<{
health: typeof health;
}>;
export { getDefaultMetricsWriters } from './helpers/metricsWriters';
declare const _default: (specPath: string, optionsOverrides: IOptions) => http.Server;
export default _default;