mirror of https://github.com/abpframework/abp.git
csharpabpc-sharpframeworkblazoraspnet-coredotnet-coreaspnetcorearchitecturesaasdomain-driven-designangularmulti-tenancy
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2.8 KiB
2.8 KiB
Environment
Current Environment Configuration holds sub config classes.
export interface Environment {
apis: Apis;
application: Application;
hmr?: boolean;
localization?: { defaultResourceName?: string };
oAuthConfig: AuthConfig;
production: boolean;
remoteEnv?: RemoteEnv;
}
Apis
export interface Apis {
[key: string]: ApiConfig;
default: ApiConfig;
}
export interface ApiConfig {
[key: string]: string;
url: string;
}
Api config has to have a default config and it may have some additional ones for different modules. I.e. you may want to connect to different Apis for different modules.
Take a look at example
{
// ...
"apis": {
"default": {
"url": "https://localhost:8080",
},
"AbpIdentity": {
"url": "https://localhost:9090",
}
},
// ...
}
When an api from AbpIdentity is called, the request will be sent to "https://localhost:9090".
Everything else will be sent to "https://localhost:8080"
## Application
export interface Application {
name: string;
baseUrl?: string;
logoUrl?: string;
}
name: Name of the backend Application. It is also used bylogo.componentiflogoUrlis not provided.logoUrl: Url of application logo. It is used bylogo.componentbaseUrl: For detailed information
Localization
You can read about Localization here in detail
## AuthConfig
For authentication, we use angular-oauth2-oidc
RemoteEnvironment
To integrate an existing config json into environment, you need to set remoteEnv
export type customMergeFn = (
localEnv: Partial<Config.Environment>,
remoteEnv: any,
) => Config.Environment;
export interface RemoteEnv {
url: string;
mergeStrategy: 'deepmerge' | 'overwrite' | customMergeFn;
method?: string;
headers?: ABP.Dictionary<string>;
}
url*: Required. The url to be used to retrieve environment configmergeStrategy: Defines how local and remote environment json will be mergeddeepmerge: Both local and remote environment json will be merged recursively. If both config has same nested path, remote environment will be prioritized.overwrite: Remote environment will be used and local environment will be ignored.customMergeFn: You can also provide your own merge function as shown in the example. It will take two parameters,localEnv: Partial<Config.Environment>andremoteEnvand it needs to return aConfig.Environmentobject.
method: HTTP method to be used when retrieving environment config. Default:GETheaders: If extra headers are needed for the request, it can be set through this field.