diff --git a/src/Nyanlabs.Umogen.Server/App.razor b/src/Nyanlabs.Umogen.Server/App.razor index 6fd3ed1..3e9cdb6 100644 --- a/src/Nyanlabs.Umogen.Server/App.razor +++ b/src/Nyanlabs.Umogen.Server/App.razor @@ -6,7 +6,7 @@ Not found -

Sorry, there's nothing at this address.

+

Sorri but we slipped and forgor the location 💀

diff --git a/src/Nyanlabs.Umogen.Server/Data/WeatherForecast.cs b/src/Nyanlabs.Umogen.Server/Data/WeatherForecast.cs deleted file mode 100644 index 0a45384..0000000 --- a/src/Nyanlabs.Umogen.Server/Data/WeatherForecast.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace Nyanlabs.Umogen.Server.Data; - -public class WeatherForecast -{ - public DateOnly Date { get; set; } - - public int TemperatureC { get; set; } - - public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); - - public string? Summary { get; set; } -} diff --git a/src/Nyanlabs.Umogen.Server/Data/WeatherForecastService.cs b/src/Nyanlabs.Umogen.Server/Data/WeatherForecastService.cs deleted file mode 100644 index eea977f..0000000 --- a/src/Nyanlabs.Umogen.Server/Data/WeatherForecastService.cs +++ /dev/null @@ -1,19 +0,0 @@ -namespace Nyanlabs.Umogen.Server.Data; - -public class WeatherForecastService -{ - private static readonly string[] Summaries = new[] - { - "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" - }; - - public Task GetForecastAsync(DateOnly startDate) - { - return Task.FromResult(Enumerable.Range(1, 5).Select(index => new WeatherForecast - { - Date = startDate.AddDays(index), - TemperatureC = Random.Shared.Next(-20, 55), - Summary = Summaries[Random.Shared.Next(Summaries.Length)] - }).ToArray()); - } -} diff --git a/src/Nyanlabs.Umogen.Server/Nyanlabs.Umogen.Server.csproj b/src/Nyanlabs.Umogen.Server/Nyanlabs.Umogen.Server.csproj index 7295c13..1770d66 100644 --- a/src/Nyanlabs.Umogen.Server/Nyanlabs.Umogen.Server.csproj +++ b/src/Nyanlabs.Umogen.Server/Nyanlabs.Umogen.Server.csproj @@ -4,6 +4,10 @@ + + + + net8.0 enable diff --git a/src/Nyanlabs.Umogen.Server/Program.cs b/src/Nyanlabs.Umogen.Server/Program.cs index 7cd2c8b..11fa1b3 100644 --- a/src/Nyanlabs.Umogen.Server/Program.cs +++ b/src/Nyanlabs.Umogen.Server/Program.cs @@ -1,11 +1,11 @@ -using Nyanlabs.Umogen.Server.Data; +using Femsci.AspapajNet; var builder = WebApplication.CreateBuilder(args); // Add services to the container. builder.Services.AddRazorPages(); builder.Services.AddServerSideBlazor(); -builder.Services.AddSingleton(); +builder.Services.AddPapiez(); var app = builder.Build(); @@ -18,6 +18,8 @@ if (!app.Environment.IsDevelopment()) app.UseHttpsRedirection(); +app.UsePapiez(); + app.UseStaticFiles(); app.UseRouting();