diff --git a/projects/native/MelonRuntime.WebServices/Entities/WebServiceApplication.cs b/projects/native/MelonRuntime.WebServices/Entities/WebServiceApplication.cs index 2aa83c9b..87f97047 100644 --- a/projects/native/MelonRuntime.WebServices/Entities/WebServiceApplication.cs +++ b/projects/native/MelonRuntime.WebServices/Entities/WebServiceApplication.cs @@ -30,7 +30,7 @@ public WebServiceApplication( _port = port; _isHttpsEnabled = isHttpsEnabled; - melon.SendInstructions($"Melon.http._apps['{name}']._promises = {{}}"); + melon.SendInstructions($"Melon.server._apps['{name}']._promises = {{}}"); } public void AddEchoes(IWebServiceApplicationEcho[] echoes) diff --git a/projects/native/MelonRuntime.WebServices/Program.cs b/projects/native/MelonRuntime.WebServices/Program.cs index 126f0108..629485d4 100644 --- a/projects/native/MelonRuntime.WebServices/Program.cs +++ b/projects/native/MelonRuntime.WebServices/Program.cs @@ -1,34 +1 @@ -var builder = WebApplication.CreateBuilder(args); - -// Add services to the container. - -var app = builder.Build(); - -// Configure the HTTP request pipeline. - -app.UseHttpsRedirection(); - -var summaries = new[] -{ - "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" -}; - -app.MapGet("/weatherforecast", () => -{ - var forecast = Enumerable.Range(1, 5).Select(index => - new WeatherForecast - ( - DateTime.Now.AddDays(index), - Random.Shared.Next(-20, 55), - summaries[Random.Shared.Next(summaries.Length)] - )) - .ToArray(); - return forecast; -}); - -app.Run(); - -internal record WeatherForecast(DateTime Date, int TemperatureC, string? Summary) -{ - public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); -} \ No newline at end of file +_ = 0; \ No newline at end of file