PlatformConfiguration
@tsed/platform-http
Usage
typescript
import { PlatformConfiguration } from "@tsed/platform-http";
See /packages/platform/platform-http/src/types/common/config/services/PlatformConfiguration.ts.
Overview
ts
class PlatformConfiguration extends DIConfiguration {
constructor();
get port(): string | number | false;
set port(value: string | number | false);
get httpsOptions(): Https.ServerOptions;
set httpsOptions(value: Https.ServerOptions);
get httpPort(): string | number | false;
set httpPort(value: string | number | false);
get httpsPort(): string | number | false;
set httpsPort(value: string | number | false);
get mount(): Record<string, TokenProvider[]>;
set mount(value: Record<string, TokenProvider[]>);
get statics(): Record<string, (any | string)[]>;
set statics(value: Record<string, (any | string)[]>);
get acceptMimes(): string[];
set acceptMimes(value: string[]);
get jsonMapper(): Partial<PlatformJsonMapperSettings>;
set jsonMapper(options: Partial<PlatformJsonMapperSettings>);
get additionalProperties(): boolean;
getHttpPort(): ReturnType<typeof getHostInfoFromPort>;
setHttpPort(settings: {
address: string;
port: number;
}): void;
getHttpsPort(): {
protocol: string;
address: string;
port: number;
toString(): string;
};
setHttpsPort(settings: {
address: string;
port: number;
}): void;
getBestHost(): {
protocol: string;
address: string;
port: number;
toString(): string;
} | {
toString(): string;
};
}
Description
PlatformConfiguration
contains all information about your Server configuration.
get port
ts
get port(): string | number | false;
set port
ts
set port(value: string | number | false);
get httpsOptions
ts
get httpsOptions(): Https.ServerOptions;
set httpsOptions
ts
set httpsOptions(value: Https.ServerOptions);
get httpPort
ts
get httpPort(): string | number | false;
set httpPort
ts
set httpPort(value: string | number | false);
get httpsPort
ts
get httpsPort(): string | number | false;
set httpsPort
ts
set httpsPort(value: string | number | false);
get mount
ts
get mount(): Record<string, TokenProvider[]>;
set mount
ts
set mount(value: Record<string, TokenProvider[]>);
get statics
ts
get statics(): Record<string, (any | string)[]>;
set statics
ts
set statics(value: Record<string, (any | string)[]>);
get acceptMimes
ts
get acceptMimes(): string[];
set acceptMimes
ts
set acceptMimes(value: string[]);
get jsonMapper
ts
get jsonMapper(): Partial<PlatformJsonMapperSettings>;
set jsonMapper
ts
set jsonMapper(options: Partial<PlatformJsonMapperSettings>);
get additionalProperties
ts
get additionalProperties(): boolean;
getHttpPort
ts
getHttpPort(): ReturnType<typeof getHostInfoFromPort>;
setHttpPort
ts
setHttpPort(settings: {
address: string;
port: number;
}): void;
getHttpsPort
ts
getHttpsPort(): {
protocol: string;
address: string;
port: number;
toString(): string;
};
setHttpsPort
ts
setHttpsPort(settings: {
address: string;
port: number;
}): void;
getBestHost
ts
getBestHost(): {
protocol: string;
address: string;
port: number;
toString(): string;
} | {
toString(): string;
};