Foxnouns.NET/Foxnouns.Backend/Config.cs

31 lines
861 B
C#
Raw Normal View History

2024-05-27 15:53:54 +02:00
using Serilog.Events;
namespace Foxnouns.Backend;
public class Config
{
public string Host { get; init; } = "localhost";
public int Port { get; init; } = 3000;
public string BaseUrl { get; init; } = null!;
2024-05-27 15:53:54 +02:00
public string Address => $"http://{Host}:{Port}";
public string? SeqLogUrl { get; init; }
public LogEventLevel LogEventLevel { get; init; } = LogEventLevel.Debug;
2024-05-27 15:53:54 +02:00
public DatabaseConfig Database { get; init; } = new();
public DiscordAuthConfig DiscordAuth { get; init; } = new();
2024-05-27 15:53:54 +02:00
public class DatabaseConfig
{
public string Url { get; init; } = string.Empty;
public int? Timeout { get; init; }
public int? MaxPoolSize { get; init; }
}
public class DiscordAuthConfig
{
public string? ClientId { get; init; }
public string? ClientSecret { get; init; }
2024-05-27 15:53:54 +02:00
}
}