Recreated solution with web app template. Improved theme. Switched to ShadcnBlazor library
This commit is contained in:
36
Moonlight.Api/Startup/Startup.Base.cs
Normal file
36
Moonlight.Api/Startup/Startup.Base.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Logging.Console;
|
||||
using Moonlight.Shared.Http;
|
||||
using Moonlight.Api.Helpers;
|
||||
|
||||
namespace Moonlight.Api.Startup;
|
||||
|
||||
public partial class Startup
|
||||
{
|
||||
private static void AddBase(WebApplicationBuilder builder)
|
||||
{
|
||||
builder.Services.AddControllers().AddJsonOptions(options =>
|
||||
{
|
||||
options.JsonSerializerOptions.TypeInfoResolverChain.Add(SerializationContext.Default);
|
||||
});
|
||||
|
||||
builder.Logging.ClearProviders();
|
||||
builder.Logging.AddConsole(options => { options.FormatterName = nameof(AppConsoleFormatter); });
|
||||
builder.Logging.AddConsoleFormatter<AppConsoleFormatter, ConsoleFormatterOptions>();
|
||||
}
|
||||
|
||||
private static void UseBase(WebApplication application)
|
||||
{
|
||||
|
||||
application.UseRouting();
|
||||
}
|
||||
|
||||
private static void MapBase(WebApplication application)
|
||||
{
|
||||
application.MapControllers();
|
||||
|
||||
application.MapFallbackToFile("index.html");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user