Alokai

CreateServerOptions

interface CreateServerOptions {
	bodyParser?: BodyParserOptions;
	cookieParser?: {
    options: cookieParser.CookieParseOptions;
    secret: string | string[];
  };
	cors?: CorsOptions | CorsOptionsDelegate;
	fileUpload?: ((req: FileUploadRequest) => FileUploadOptions) | FileUploadOptions;
	readinessProbes?: ReadinessProbe[];
}

Properties

NameRequiredTypeDescription
bodyParserOptionalBodyParserOptionsThe options for the express.json middleware. If not provided, the default options will be used.
cookieParserOptional{ options: cookieParser.CookieParseOptions; secret: string | string[]; }The options for the cookie-parser middleware. If not provided, the default options will be used.
corsOptionalCorsOptions | CorsOptionsDelegateThe options for the cors middleware. If not provided, the following configuration will be used: json { "credentials": true, "origin": ["http://localhost:3000", "http://localhost:4000"] }
fileUploadOptional((req: FileUploadRequest) => FileUploadOptions) | FileUploadOptionsConfiguration options for handling file uploads.
readinessProbesOptionalReadinessProbe[]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

On this page