BRAKING refactor project structure.
Refactor: the project is now divided into a more clear structure, with **Infrastructure** and **Application** layers added. Refactor: configurations are split into sections for different layers. Fix: now EF Core related operations, such as migration, should be invoked in `OptixServe.Infrastructure`, with config file and data dir passed into `dotnet ef` command. See `OptixServe.Infrastructure/Utilites/DesignTimeDbContextFactory.cs` for details. Fix: EF migrations are ignored in gitignore on purpose in early development.
This commit is contained in:
21
OptixServe.Api/Configuration/ApiConfiguration.cs
Normal file
21
OptixServe.Api/Configuration/ApiConfiguration.cs
Normal file
@ -0,0 +1,21 @@
|
||||
namespace OptixServe.Api.Configuration;
|
||||
|
||||
public record ApiConfiguration
|
||||
{
|
||||
public ApiSettings? Api { get; set; } = new();
|
||||
public JwtSettings? Jwt { get; set; } = new();
|
||||
}
|
||||
|
||||
public record ApiSettings
|
||||
{
|
||||
public string? Listen { get; set; }
|
||||
public int? Port { get; set; }
|
||||
}
|
||||
|
||||
public record JwtSettings
|
||||
{
|
||||
public string Secret { get; set; } = string.Empty;
|
||||
public string Issuer { get; set; } = "OptixServe";
|
||||
public string Audience { get; set; } = "OptixServeUsers";
|
||||
public int TokenExpirationMinutes { get; set; } = 60;
|
||||
}
|
Reference in New Issue
Block a user