feat: load application and repository configuration from env and TOML
This commit is contained in:
commit
ae8680d275
17 files changed
+301
No files matched your search
+15
@@ -0,0 +1,15 @@
|
||||
using ForgejoReleaseSync.Services;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
|
||||
var builder = Host.CreateApplicationBuilder(args);
|
||||
|
||||
var config = AppConfigLoader.LoadConfigFromEnv();
|
||||
builder.Services.AddSingleton(config);
|
||||
|
||||
var repositoryConfig = await RepoConfigLoader.LoadConfigAsync(
|
||||
config.RepositoryConfigFilePath);
|
||||
builder.Services.AddSingleton(repositoryConfig);
|
||||
|
||||
var app = builder.Build();
|
||||
await app.RunAsync();
|
||||
Reference in new issue
Block a user