Hydra/Hydra.Backend/Config.cs

27 lines
763 B
C#
Raw Permalink Normal View History

2024-08-04 15:57:10 +02:00
using Serilog.Events;
namespace Hydra.Backend;
public class Config
{
public string Host { get; init; } = "localhost";
public int Port { get; init; } = 3000;
public string Address => $"http://{Host}:{Port}";
public LoggingConfig Logging { get; init; } = new();
public DatabaseConfig Database { get; init; } = new();
public class LoggingConfig
{
public LogEventLevel LogEventLevel { get; init; } = LogEventLevel.Debug;
public string? SeqLogUrl { get; init; }
public bool LogQueries { get; init; } = false;
}
public class DatabaseConfig
{
public string Url { get; init; } = string.Empty;
public int? Timeout { get; init; }
public int? MaxPoolSize { get; init; }
}
}