interface NestConfig {
    abortOnError?: boolean;
    autoFlushLogs?: boolean;
    bodyParser?: boolean;
    bufferLogs?: boolean;
    cors?: boolean | CorsOptions | CorsOptionsDelegate<any>;
    forceCloseConnections?: boolean;
    httpsOptions?: HttpsOptions;
    logger?: false | LoggerService | LogLevel[];
    port: number;
    preview?: boolean;
    rawBody?: boolean;
    rootModule: any;
    snapshot?: boolean;
}

Hierarchy

  • NestApplicationOptions
    • NestConfig

Properties

abortOnError?: boolean

Whether to abort the process on Error. By default, the process is exited. Pass false to override the default behavior. If false is passed, Nest will not exit the application and instead will rethrow the exception.

Default

true
autoFlushLogs?: boolean

If enabled, logs will be automatically flushed and buffer detached when application initialization process either completes or fails.

Default

true
bodyParser?: boolean

Whether to use underlying platform body parser.

bufferLogs?: boolean

If enabled, logs will be buffered until the "Logger#flush" method is called.

Default

false
cors?: boolean | CorsOptions | CorsOptionsDelegate<any>

CORS options from CORS package

forceCloseConnections?: boolean

Force close open HTTP connections. Useful if restarting your application hangs due to keep-alive connections in the HTTP adapter.

httpsOptions?: HttpsOptions

Set of configurable HTTPS options

logger?: false | LoggerService | LogLevel[]

Specifies the logger to use. Pass false to turn off logging.

port: number
preview?: boolean

Whether to run application in the preview mode. In the preview mode, providers/controllers are not instantiated & resolved.

Default

false
rawBody?: boolean

Whether to register the raw request body on the request. Use req.rawBody.

rootModule: any
snapshot?: boolean

Whether to generate a serialized graph snapshot.

Default

false