Skip to content

Latest commit

 

History

History
43 lines (25 loc) · 1.53 KB

app.md

File metadata and controls

43 lines (25 loc) · 1.53 KB

Application Module

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 and class-transformer on requests DTOs.

Environment Configuration

The following variables will be taken into account when booting the application:

Variable Mandatory Type
NODE_ENV Yes AppEnvironment

Module Options

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.


Back to title