NestExpressApplication
Interface describing methods on NestExpressApplication.
interface NestExpressApplication extends INestApplication {
listen(port: string | number, callback?: () => void): Promise<Server>
set(...args: any[]): this
engine(...args: any[]): this
enable(...args: any[]): this
disable(...args: any[]): this
useStaticAssets(options: ServeStaticOptions): this
useBodyParser<Options = NestExpressBodyParserOptions>(parser: NestExpressBodyParserType, options?: Omit<Options, "verify">): this
setBaseViewsDir(path: string | string[]): this
setViewEngine(engine: string): this
setLocal(key: string, value: any): this
}
See also
Methods
listen() | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Starts the application. |
||||||||||||
Parameters
Returns
|
set() |
---|
A wrapper function around native |
engine() |
---|
A wrapper function around native |
enable() |
---|
A wrapper function around native |
disable() |
---|
A wrapper function around native |
useStaticAssets() |
---|
useBodyParser() | |||||||||
---|---|---|---|---|---|---|---|---|---|
Register Express body parsers on the fly. Will respect
the application's |
|||||||||
Parameters
Examples
Returns
|
setBaseViewsDir() |
---|
Sets one or multiple base directories for templates (views). |
setViewEngine() |
---|
Sets a view engine for templates (views). |
setLocal() |
---|
Sets app-level globals for view templates. |