Open sadiomanhne opened 2 months ago
Hi @sadiomanhne ,
Workflow Server is not based on the ASP.NET framework, so features of this framework are not supported, including the creation of configuration files with the ASPNETCORE_ENVIRONMENT in their name.
However, you can implement similar functionality by yourself, as the configuration can be set not only through a file but also in the code. When calling WorkflowServerInitializer.BuildWebHost
, you can pass a lambda expression whose argument has the property WorkflowServerRuntime.ServerSettings
. This property contains settings from the configuration, and you can set their values using any source.
var initializer = new WorkflowServerInitializer(consoleLog: true, eventLog: false, moveUpBackendFolderIfConfig: false);
(bool success, IWebHost host) = initializer.BuildWebHost(workflowServer =>
{
workflowServer.ServerSettings.Provider = "mssql";
workflowServer.ServerSettings.ConnectionString = "Data Source=(local);Initial Catalog=WorkflowServer;User ID=sa;Password=1;";
});
Best regards,
Rylee, OptimaJet Developer.
How can I setup to load the configuration from config.*.json (* is an ASPNETCORE_ENVIRONMENT variable, eg: DEV, PROD)?