@nestjs/common#HttpServer TypeScript Examples
The following examples show how to use
@nestjs/common#HttpServer.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: http-adapter.d.ts From nest-jaeger with MIT License | 5 votes |
/**
* @publicApi
*/
export declare abstract class AbstractHttpAdapter<TServer = any, TRequest = any, TResponse = any> implements HttpServer<TRequest, TResponse> {
protected readonly instance: any;
protected httpServer: TServer;
constructor(instance: any);
use(...args: any[]): any;
get(handler: RequestHandler): any;
get(path: any, handler: RequestHandler): any;
post(handler: RequestHandler): any;
post(path: any, handler: RequestHandler): any;
head(handler: RequestHandler): any;
head(path: any, handler: RequestHandler): any;
delete(handler: RequestHandler): any;
delete(path: any, handler: RequestHandler): any;
put(handler: RequestHandler): any;
put(path: any, handler: RequestHandler): any;
patch(handler: RequestHandler): any;
patch(path: any, handler: RequestHandler): any;
options(handler: RequestHandler): any;
options(path: any, handler: RequestHandler): any;
listen(port: string | number, callback?: () => void): any;
listen(port: string | number, hostname: string, callback?: () => void): any;
getHttpServer(): TServer;
setHttpServer(httpServer: TServer): void;
getInstance<T = any>(): T;
abstract close(): any;
abstract initHttpServer(options: NestApplicationOptions): any;
abstract useStaticAssets(...args: any[]): any;
abstract setViewEngine(engine: string): any;
abstract getRequestHostname(request: any): any;
abstract getRequestMethod(request: any): any;
abstract getRequestUrl(request: any): any;
abstract status(response: any, statusCode: number): any;
abstract reply(response: any, body: any, statusCode?: number): any;
abstract render(response: any, view: string, options: any): any;
abstract redirect(response: any, statusCode: number, url: string): any;
abstract setErrorHandler(handler: Function, prefix?: string): any;
abstract setNotFoundHandler(handler: Function, prefix?: string): any;
abstract setHeader(response: any, name: string, value: string): any;
abstract registerParserMiddleware(prefix?: string): any;
abstract enableCors(options: CorsOptions, prefix?: string): any;
abstract createMiddlewareFactory(requestMethod: RequestMethod): (path: string, callback: Function) => any;
abstract getType(): string;
}
Example #2
Source File: base-exception-filter.d.ts From nest-jaeger with MIT License | 5 votes |
handleUnknownError(exception: T, host: ArgumentsHost, applicationRef: AbstractHttpAdapter | HttpServer): void;
Example #3
Source File: base-exception-filter.d.ts From nest-jaeger with MIT License | 5 votes |
constructor(applicationRef?: HttpServer);
Example #4
Source File: base-exception-filter.d.ts From nest-jaeger with MIT License | 5 votes |
protected readonly applicationRef?: HttpServer;
Example #5
Source File: router-method-factory.d.ts From nest-jaeger with MIT License | 5 votes |
get(target: HttpServer, requestMethod: RequestMethod): Function;
Example #6
Source File: middleware-module.d.ts From nest-jaeger with MIT License | 5 votes |
register(middlewareContainer: MiddlewareContainer, container: NestContainer, config: ApplicationConfig, injector: Injector, httpAdapter: HttpServer): Promise<void>;
Example #7
Source File: nest-application.d.ts From nest-jaeger with MIT License | 5 votes |
constructor(container: NestContainer, httpAdapter: HttpServer, config: ApplicationConfig, appOptions?: NestApplicationOptions);
Example #8
Source File: router-exception-filters.d.ts From nest-jaeger with MIT License | 5 votes |
constructor(container: NestContainer, config: ApplicationConfig, applicationRef: HttpServer);
Example #9
Source File: router-execution-context.d.ts From nest-jaeger with MIT License | 5 votes |
constructor(paramsFactory: IRouteParamsFactory, pipesContextCreator: PipesContextCreator, pipesConsumer: PipesConsumer, guardsContextCreator: GuardsContextCreator, guardsConsumer: GuardsConsumer, interceptorsContextCreator: InterceptorsContextCreator, interceptorsConsumer: InterceptorsConsumer, applicationRef: HttpServer);
Example #10
Source File: router-execution-context.d.ts From nest-jaeger with MIT License | 5 votes |
readonly applicationRef: HttpServer;
Example #11
Source File: router-explorer.d.ts From nest-jaeger with MIT License | 5 votes |
explore<T extends HttpServer = any>(instanceWrapper: InstanceWrapper, module: string, applicationRef: T, basePath: string, host: string): void;
Example #12
Source File: router-explorer.d.ts From nest-jaeger with MIT License | 5 votes |
applyPathsToRouterProxy<T extends HttpServer>(router: T, routePaths: RoutePathProperties[], instanceWrapper: InstanceWrapper, moduleKey: string, basePath: string, host: string): void;
Example #13
Source File: router-response-controller.d.ts From nest-jaeger with MIT License | 5 votes |
constructor(applicationRef: HttpServer);