switch project to use web sdk and implement `ApiStartup`

This commit is contained in:
Alan Moon 2024-11-27 10:54:28 -08:00
parent d2a11b04e2
commit 4198480e53
2 changed files with 21 additions and 1 deletions

20
src/API/ApiStartup.cs Normal file
View File

@ -0,0 +1,20 @@
using System;
namespace sodoffmmo.API;
public class ApiStartup
{
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
});
}
public void ConfigureServices(IServiceCollection services)
{
services.AddControllers();
}
}

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk.web">
<PropertyGroup>
<OutputType>Exe</OutputType>