Acts as an entry point, wrapping other modules provided in this package as well as automatically requiring any *.module.ts
file in the project source folder.
Upon start, it will serve an HTTP adapter based on Fastify.
The following custom enhancers will be globally applied:
- app.interceptor.ts - Timeout interceptor to cancel running request that expires configured runtime.
- app.filter.ts - Exception filter integrated with log service to standardize error outputs.
Plus these techniques as officially documented:
- ClassSerializer - Serialization interceptor to stringify responses.
- ValidationPipe - Validation pipe to make use of
class-validator
andclass-transformer
on requests DTOs.
The following variables will be taken into account when booting the application:
Variable | Mandatory | Type |
---|---|---|
NODE_ENV | Yes | AppEnvironment |
When booting your application, you may configure options according to AppBootOptions:
import { AppModule } from '@bechara/crux';
void AppModule.boot({ /* See AppBootOptions */ });
Provided options will be merged with defaults.