UNPKG

@antibot/server

Version:

## 🖥️💫 A quick express backend module.

49 lines 1.41 kB
import { Application } from "express"; import { HelmetOptions } from "helmet"; import { Options as RateLimitOptions } from "express-rate-limit"; export interface ExpressJsonOptions { reviver?(key: string, value: any): any; strict?: boolean | undefined; } export interface ExpressTextOptions { defaultCharset?: string | undefined; } export interface ExpressUrlencodedOptions { extended?: boolean | undefined; parameterLimit?: number | undefined; } export interface ServerOptions { port?: number | 3000; host?: string; settings: { routesDirectory?: string; routesEndpoint?: string | "/api"; useJson?: boolean; useText?: boolean; useUrlencoded?: boolean; json?: ExpressJsonOptions; text?: ExpressTextOptions; urlencoded?: ExpressUrlencodedOptions; viewEngine?: string; views?: string; viewExt?: string; debug?: boolean; }; cors?: { origin?: string; methods?: string; preflightContinue?: boolean; optionsSuccessStatus: number; }; helmet?: HelmetOptions; ratelimit?: RateLimitOptions; } export declare class Server { #private; protected readonly options: ServerOptions; app: Application; constructor(options: ServerOptions); start(): void; get getConfig(): ServerOptions; } //# sourceMappingURL=Server.d.ts.map