commit 314eaedc551ecb76d0c22ea7230db7e49c321005 Author: Steve Date: Mon Dec 29 13:55:31 2025 -0600 Initial commit of Jetbrains Rider web api tempate diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..add57be --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +bin/ +obj/ +/packages/ +riderModule.iml +/_ReSharper.Caches/ \ No newline at end of file diff --git a/SDG-Backend-Barracuda.sln b/SDG-Backend-Barracuda.sln new file mode 100644 index 0000000..d2baadf --- /dev/null +++ b/SDG-Backend-Barracuda.sln @@ -0,0 +1,16 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SDG-Backend-Barracuda", "SDG-Backend-Barracuda\SDG-Backend-Barracuda.csproj", "{B29DDE13-FB5C-4E63-9E9F-6A5F277F8B2E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B29DDE13-FB5C-4E63-9E9F-6A5F277F8B2E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B29DDE13-FB5C-4E63-9E9F-6A5F277F8B2E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B29DDE13-FB5C-4E63-9E9F-6A5F277F8B2E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B29DDE13-FB5C-4E63-9E9F-6A5F277F8B2E}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/SDG-Backend-Barracuda/Program.cs b/SDG-Backend-Barracuda/Program.cs new file mode 100644 index 0000000..d5e0ef3 --- /dev/null +++ b/SDG-Backend-Barracuda/Program.cs @@ -0,0 +1,41 @@ +var builder = WebApplication.CreateBuilder(args); + +// Add services to the container. +// Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi +builder.Services.AddOpenApi(); + +var app = builder.Build(); + +// Configure the HTTP request pipeline. +if (app.Environment.IsDevelopment()) +{ + app.MapOpenApi(); +} + +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 + ( + DateOnly.FromDateTime(DateTime.Now.AddDays(index)), + Random.Shared.Next(-20, 55), + summaries[Random.Shared.Next(summaries.Length)] + )) + .ToArray(); + return forecast; + }) + .WithName("GetWeatherForecast"); + +app.Run(); + +record WeatherForecast(DateOnly Date, int TemperatureC, string? Summary) +{ + public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); +} \ No newline at end of file diff --git a/SDG-Backend-Barracuda/Properties/launchSettings.json b/SDG-Backend-Barracuda/Properties/launchSettings.json new file mode 100644 index 0000000..0dab5c2 --- /dev/null +++ b/SDG-Backend-Barracuda/Properties/launchSettings.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://json.schemastore.org/launchsettings.json", + "profiles": { + "http": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": false, + "applicationUrl": "http://localhost:5164", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "https": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": false, + "applicationUrl": "https://localhost:7075;http://localhost:5164", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/SDG-Backend-Barracuda/SDG-Backend-Barracuda.csproj b/SDG-Backend-Barracuda/SDG-Backend-Barracuda.csproj new file mode 100644 index 0000000..d76291f --- /dev/null +++ b/SDG-Backend-Barracuda/SDG-Backend-Barracuda.csproj @@ -0,0 +1,14 @@ + + + + net10.0 + enable + enable + SDG_Backend_Barracuda + + + + + + + diff --git a/SDG-Backend-Barracuda/SDG-Backend-Barracuda.http b/SDG-Backend-Barracuda/SDG-Backend-Barracuda.http new file mode 100644 index 0000000..4d8d6b3 --- /dev/null +++ b/SDG-Backend-Barracuda/SDG-Backend-Barracuda.http @@ -0,0 +1,6 @@ +@SDG_Backend_Barracuda_HostAddress = http://localhost:5164 + +GET {{SDG_Backend_Barracuda_HostAddress}}/weatherforecast/ +Accept: application/json + +### diff --git a/SDG-Backend-Barracuda/appsettings.Development.json b/SDG-Backend-Barracuda/appsettings.Development.json new file mode 100644 index 0000000..0c208ae --- /dev/null +++ b/SDG-Backend-Barracuda/appsettings.Development.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + } +} diff --git a/SDG-Backend-Barracuda/appsettings.json b/SDG-Backend-Barracuda/appsettings.json new file mode 100644 index 0000000..10f68b8 --- /dev/null +++ b/SDG-Backend-Barracuda/appsettings.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*" +}