# PlatformDriver Class platform
Module | import { PlatformDriver } from "@tsed/common" |
---|---|
Source | /packages/common/src/platform/services/PlatformDriver.ts |
# Overview
class PlatformDriver<T> implements IPlatformDriver<T> {
protected platformHandler: PlatformHandler;
raw: T;
constructor(platformHandler: PlatformHandler);
callback(): any;
use(...handlers: any[]): this;
addRoute({ method, path, handlers }: IPlatformRouteOptions): this;
all(path: PathParamsType, ...handlers: any[]): this;
get(path: PathParamsType, ...handlers: any[]): this;
post(path: PathParamsType, ...handlers: any[]): this;
put(path: PathParamsType, ...handlers: any[]): this;
delete(path: PathParamsType, ...handlers: any[]): this;
patch(path: PathParamsType, ...handlers: any[]): this;
head(path: PathParamsType, ...handlers: any[]): this;
options(path: PathParamsType, ...handlers: any[]): this;
mapHandlers(handlers: any[]): any[];
}
# Description
Platform driver abstraction layer.
# Members
protected platformHandler: PlatformHandler;
raw: T;
callback(): any;
use(...handlers: any[]): this;
addRoute({ method, path, handlers }: IPlatformRouteOptions): this;
all(path: PathParamsType, ...handlers: any[]): this;
get(path: PathParamsType, ...handlers: any[]): this;
post(path: PathParamsType, ...handlers: any[]): this;
put(path: PathParamsType, ...handlers: any[]): this;
delete(path: PathParamsType, ...handlers: any[]): this;
patch(path: PathParamsType, ...handlers: any[]): this;
head(path: PathParamsType, ...handlers: any[]): this;
options(path: PathParamsType, ...handlers: any[]): this;
mapHandlers(handlers: any[]): any[];
- Session & cookies
- Passport.js
- TypeORM
- Mongoose
- GraphQL
- Socket.io
- Swagger
- AJV
- Multer
- Serve static files
- Templating
- Throw HTTP Exceptions
- Customize 404
- AWS
- Jest
- Seq
- Controllers
- Providers
- Model
- Converters
- Middlewares
- Pipes
- Interceptors
- Authentication
- Hooks
- Injection scopes
- Custom providers
- Custom endpoint decorator
- Testing