Configuration will be included in a local json file.
Example token: "./path/to/configuration"
Configuration will be included in a json file on some external http/https host and will be served statically.
Example token: "http://localhost:1234"
Configuration will be available as an entry point of a special Scalecube server.
Configuration will be available as an entry point of some http/https server.
Example token: "http://localhost:1234"
Configuration will be available under a special key in localStorage.
Example token: "configurationKey"
Is used to get the class of an appropriate ConfigurationProvider.
Will throw an error, if wrong configProvider is provided in the call of the function.
Possible values for configProvider:
- "localFile"
- "httpFile"
- "scalecube"
- "httpServer"
- "localStorage"
Example
try {
const HttpFileConfigurationProvider = getProvider({ configProvider: "localFile" as LocalFileConfigurationProvider });
const configurationService = new HttpFileConfigurationProvider("http://localhost:1234");
} catch(error) {
console.log('error.message');
}