config: ValueObject<{
    environment: (() => "test" | "development" | "production");
    fullDevLogs: (() => boolean);
    healthEndpointPort: (() => number);
    isDev: (() => boolean);
    isProd: (() => boolean);
    logLevel: (() => "" | "FATAL" | "ERROR" | "WARN" | "INFO" | "DEBUG" | "TRACE");
    logMaskKeywords: (() => string[]);
    logMaskMaxDepth: (() => number);
    secureLoggingMode: (() => MaskMode);
    serviceId: (() => string);
    useEphemeralPortsDuringDev: (() => boolean);
}> = ...

The basic Configuration type

Type declaration

  • environment: (() => "test" | "development" | "production")
      • (): "test" | "development" | "production"
      • Returns "test" | "development" | "production"

        Example

        NODE_ENV=development
        
  • fullDevLogs: (() => boolean)
      • (): boolean
      • Returns boolean

        Example

        FULL_DEV_LOGS=true
        
  • healthEndpointPort: (() => number)
      • (): number
      • Returns number

        Example

        HEALTH_ENDPOINT_PORT=9000
        
  • isDev: (() => boolean)
      • (): boolean
      • Returns boolean

        Example

        NODE_ENV=development
        
  • isProd: (() => boolean)
      • (): boolean
      • Returns boolean

        Example

        NODE_ENV=production
        
  • logLevel: (() => "" | "FATAL" | "ERROR" | "WARN" | "INFO" | "DEBUG" | "TRACE")
      • (): "" | "FATAL" | "ERROR" | "WARN" | "INFO" | "DEBUG" | "TRACE"
      • Returns "" | "FATAL" | "ERROR" | "WARN" | "INFO" | "DEBUG" | "TRACE"

        Example

        LOG_LEVEL=INFO
        
  • logMaskKeywords: (() => string[])
      • (): string[]
      • Returns string[]

        Example

        LOG_MASK_KEYWORDS=secret,password,connectionString
        
  • logMaskMaxDepth: (() => number)
      • (): number
      • Returns number

        Example

        LOG_MASK_MAX_DEPTH=10
        
  • secureLoggingMode: (() => MaskMode)
      • (): MaskMode
      • Returns MaskMode

        Example

        SECURE_LOGGING_MODE=UNSAFE_DEBUG_UNSAFE
        
  • serviceId: (() => string)
      • (): string
      • Returns string

        Example

        SERVICE_ID=my-business-service
        
  • useEphemeralPortsDuringDev: (() => boolean)
      • (): boolean
      • This is used to determine if the service should use ephemeral ports for general endpoints during development. This is useful to avoid port conflicts when running multiple services having the same general port number (i.e. liveness/readiness, maintenance, monitoring, etc.).

        However if running services in a container, this should be set to false, as the container isolates the ports for each service.

        NOTE: this is effective only when the service is running in development mode (i.e. NODE_ENV=development).

        Returns boolean

        Example

        USE_EPHEMERAL_PORTS_DURING_DEV=true
        

Generated using TypeDoc