Added configuration support for toml and ini

This commit is contained in:
Mia Rose Winter 2024-01-18 14:08:06 +01:00
parent 3cdb9c3cc8
commit 0a85bcc7cf
Signed by: miawinter
GPG key ID: 4B6F6A83178F595E
2 changed files with 5 additions and 2 deletions

View file

@ -3,6 +3,7 @@
using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Options;
using Tomlyn.Extensions.Configuration;
using Wave.Components;
using Wave.Components.Account;
using Wave.Data;
@ -12,7 +13,9 @@
builder.Configuration
.AddEnvironmentVariables("WAVE_")
.AddJsonFile("/configuration/config.json", true, false)
.AddYamlFile("/configuration/config.yml", true, false);
.AddYamlFile("/configuration/config.yml", true, false)
.AddTomlFile("/configuration/config.toml", true, false)
.AddIniFile( "/configuration/config.ini", true, false);
builder.Services.AddRazorComponents().AddInteractiveServerComponents();
builder.Services.AddControllers();

View file

@ -24,10 +24,10 @@
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.6" />
<PackageReference Include="NetEscapades.Configuration.Yaml" Version="3.1.0" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.0" />
<PackageReference Include="Tomlyn.Extensions.Configuration" Version="1.0.5" />
</ItemGroup>
<ItemGroup>
<Folder Include="Services\" />
<Folder Include="wwwroot\img\" />
</ItemGroup>