# Class Application<Config, Ref, Env>`Abstract`

#### Type Parameters

- Config extends object
- Ref extends RefWithInjector
- Env extends Environment

#### Hierarchy (View Summary)

- Application
  - ModuleApplication
  - StandaloneApplication

- Defined in application.ts:37

#####
Index

### Constructors

constructor

### Properties

app
config
configLoadOptions?
environment
logger
options

### Methods

after
before
bootstrap
create
handleAfter
handleBefore
loadConfig
prepareConfig
prepareEnvironment

##
Constructors

### constructor

- new Application<
  Config extends object,
  Ref extends RefWithInjector,
  Env extends Environment,
  >(
  environment: Env,
  options?: Config,
  configLoadOptions?: ConfigLoadOptions,
  ): Application<Config, Ref, Env>

  #### Type Parameters

  - Config extends object
  - Ref extends RefWithInjector
  - Env extends Environment

  #### Parameters

  - environment: Env
  - options: Config = ...
  - `Optional` configLoadOptions: ConfigLoadOptions

  #### Returns Application<Config, Ref, Env>

  - Defined in application.ts:45

##
Properties

### app

app: null | Ref = null

- Defined in application.ts:39

### config

config: null | ConfigService<Record<string, any>> = null

- Defined in application.ts:41

### `Optional` `Readonly` configLoadOptions

configLoadOptions?: ConfigLoadOptions

- Defined in application.ts:48

### `Readonly` environment

environment: Env

- Defined in application.ts:46

### logger

logger: null | Console = null

- Defined in application.ts:40

### `Readonly` options

options: Config = ...

- Defined in application.ts:47

##
Methods

### after

- after(fnc: ApplicationAfterFunction<Config, Ref, Env>): void

  #### Parameters

  - fnc: ApplicationAfterFunction<Config, Ref, Env>

  #### Returns void

  - Defined in application.ts:90

### before

- before(fnc: ApplicationBeforeFunction<Config, Ref, Env>): void

  #### Parameters

  - fnc: ApplicationBeforeFunction<Config, Ref, Env>

  #### Returns void

  - Defined in application.ts:86

### bootstrap

- bootstrap(): Promise<void>

  #### Returns Promise<void>

  - Defined in application.ts:51

### `Protected` `Abstract` create

- create(): Promise<Ref>

  #### Returns Promise<Ref>

  - Defined in application.ts:116

### `Protected` handleAfter

- handleAfter(
  app: Ref,
  logger: Console,
  config: ConfigService,
  options: Config,
  environment: Env,
  ): Promise<void>

  #### Parameters

  - app: Ref
  - logger: Console
  - config: ConfigService
  - options: Config
  - environment: Env

  #### Returns Promise<void>

  - Defined in application.ts:100

### `Protected` handleBefore

- handleBefore(
  config: ConfigService,
  options: Config,
  environment: Env,
  ): Promise<void>

  #### Parameters

  - config: ConfigService
  - options: Config
  - environment: Env

  #### Returns Promise<void>

  - Defined in application.ts:94

### `Protected` loadConfig

- loadConfig(environment: Env): Promise<void>

  #### Parameters

  - environment: Env

  #### Returns Promise<void>

  - Defined in application.ts:106

### `Protected` `Abstract` prepareConfig

- prepareConfig(config: Config): void

  #### Parameters

  - config: Config

  #### Returns void

  - Defined in application.ts:114

### `Protected` prepareEnvironment

- prepareEnvironment(environment: Env): Promise<void>

  #### Parameters

  - environment: Env

  #### Returns Promise<void>

  - Defined in application.ts:110