CreateServerOptions
interface CreateServerOptions {
bodyParser?: BodyParserOptions;
cookieParser?: {
options: cookieParser.CookieParseOptions;
secret: string | string[];
};
cors?: CorsOptions | CorsOptionsDelegate;
fileUpload?: ((req: FileUploadRequest) => FileUploadOptions) | FileUploadOptions;
readinessProbes?: ReadinessProbe[];
}Properties
| Name | Required | Type | Description |
|---|---|---|---|
bodyParser | Optional | BodyParserOptions | The options for the express.json middleware. If not provided, the default options will be used. |
cookieParser | Optional | { options: cookieParser.CookieParseOptions; secret: string | string[]; } | The options for the cookie-parser middleware. If not provided, the default options will be used. |
cors | Optional | CorsOptions | CorsOptionsDelegate | The options for the cors middleware. If not provided, the following configuration will be used: json { "credentials": true, "origin": ["http://localhost:3000", "http://localhost:4000"] } |
fileUpload | Optional | ((req: FileUploadRequest) => FileUploadOptions) | FileUploadOptions | Configuration options for handling file uploads. |
readinessProbes | Optional | ReadinessProbe[] | Array of functions that will be called in parallel every time the /readyz endpoint receives a GET request If at least one function throws an exception, the response from the /readyz endpoint will report an error |
Referenced Types
- BodyParserOptions
cookieParser.CookieParseOptionse.CorsOptionse.CorsOptionsDelegate- FileUploadRequest
- FileUploadOptions
- ReadinessProbe