포트 80번으로 변경, Swagger 추가

This commit is contained in:
2025-09-07 18:11:08 +09:00
parent 48ca53a6c3
commit a1161d794d
3 changed files with 34 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<OutputType>Exe</OutputType>
@@ -11,4 +11,8 @@
<ProjectReference Include="..\BrokerDogLib\BrokerDogLib.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Swashbuckle.AspNetCore" Version="9.0.4" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,12 @@
{
"profiles": {
"BrokerDogConsole": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "https://localhost:57728;http://localhost:57729"
}
}
}

View File

@@ -1,7 +1,20 @@
public class Program
namespace BrokerDogConsole
{
public class Program
{
public static void Main(string[] args)
{
Console.WriteLine("Hello, World!");
var builder = WebApplication.CreateBuilder(args);
builder.WebHost.UseUrls("http://localhost:80");
builder.Services.AddControllers();
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
var app = builder.Build();
app.UseSwagger();
app.UseSwaggerUI();
app.MapControllers();
app.Run();
}
}
}