ConfigService
The ConfigService service is used to set and access the project configuration.
import { ConfigService, Inject } from '@archibald/server';
In order to use the ConfigService service, you need to inject it by using the Inject decorator function.
@Inject()
protected configService: ConfigService;
get
This method retrieves the project configuration.
const config = this.configService.get();
set
This method sets the project configuration and saves it internally to be accessed at a later point.
this.configService.set(PARAMETERS);
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| config | DeepPartial<DefaultConfig> | An object with the project configuration. |
replace
This method replaces the project configuration and saves it internally to be accessed at a later point.
this.configService.replace(PARAMETERS);
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| config | DefaultConfig | An object with the project configuration. |