@nestjs/common APIs
- Module
- Injectable
- Controller
- Get
- Post
- Inject
- INestApplication
- Body
- Logger
- ExecutionContext
- DynamicModule
- Param
- UseGuards
- Query
- Provider
- HttpStatus
- ValidationPipe
- Global
- Type
- UnauthorizedException
- HttpException
- CanActivate
- SetMetadata
- Delete
- BadRequestException
- NotFoundException
- Req
- Res
- UseInterceptors
- Catch
- ArgumentsHost
- createParamDecorator
- OnModuleInit
- ExceptionFilter
- Put
- CallHandler
- NestInterceptor
- Request
- HttpCode
- ForbiddenException
- Scope
- ModuleMetadata
- PipeTransform
- OnModuleDestroy
- Patch
- LoggerService
- MiddlewareConsumer
- ArgumentMetadata
- applyDecorators
- RequestMethod
- NestMiddleware
- InternalServerErrorException
- UploadedFile
- UsePipes
- ConflictException
- forwardRef
- ParseIntPipe
- NestModule
- CustomDecorator
- HttpModule
- Optional
- UseFilters
- ClassSerializerInterceptor
- OnApplicationShutdown
- HttpService
- Header
- FactoryProvider
- NotAcceptableException
- Response
- Redirect
- OnApplicationBootstrap
- DefaultValuePipe
- Headers
- flatten
- Render
- ParseArrayPipe
- INestApplicationContext
- INestMicroservice
- ContextType
- ServiceUnavailableException
- mixin
- ParamData
- CacheTTL
- NotImplementedException
- UploadedFiles
- ValidationPipeOptions
- WebSocketAdapter
- ForwardReference
- CacheModule
- ValueProvider
- ValidationError
- ImATeapotException
- Sse
- All
- Next
- ParseBoolPipe
- HttpServer
- IntrospectionResult
- ShutdownSignal
- NestHybridApplicationOptions
- Paramtype
- UnsupportedMediaTypeException
- StreamableFile
- LogLevel
- Ip
- UnprocessableEntityException
- RpcExceptionFilter
- Session
- NestApplicationOptions
- BadGatewayException
- CACHE_MANAGER
- ParseUUIDPipe
Other Related APIs
@nestjs/common#NestApplicationOptions TypeScript Examples
The following examples show how to use
@nestjs/common#NestApplicationOptions.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: main.ts From api with GNU Affero General Public License v3.0 | 6 votes |
void (async () => {
const options: NestApplicationOptions = {
bufferLogs: true,
}
const app = await NestFactory.create(AppModule, options)
app.useLogger(app.get(Logger))
app.useGlobalPipes(new ValidationPipe({
disableErrorMessages: false,
transform: true,
}))
app.enableCors({origin: '*'})
app.getHttpAdapter().options('*', cors())
await app.listen(process.env.PORT || 4100);
})()