Hydra/Hydra.Backend/Config.cs

27 lines
No EOL
763 B
C#

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; }
}
}