Add initial ASP.NET Core project structure
This commit introduces the initial setup for the DigitalData.TaskFlow solution: - Added `DigitalData.TaskFlow.sln` to organize the project structure into `src`, `presentation`, `core`, and `infrastructure` folders. - Created `DigitalData.TaskFlow.API` project targeting .NET 8.0 with nullable reference types and Swagger/OpenAPI support. - Added `Program.cs` to configure the ASP.NET Core application with services, middleware, and Swagger UI. - Added `launchSettings.json` for development profiles and environment variables. - Added `appsettings.json` and `appsettings.Development.json` for logging and configuration.
This commit is contained in:
25
src/presentation/DigitalData.TaskFlow.API/Program.cs
Normal file
25
src/presentation/DigitalData.TaskFlow.API/Program.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Add services to the container.
|
||||
|
||||
builder.Services.AddControllers();
|
||||
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
|
||||
builder.Services.AddEndpointsApiExplorer();
|
||||
builder.Services.AddSwaggerGen();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
if (app.Environment.IsDevelopment())
|
||||
{
|
||||
app.UseSwagger();
|
||||
app.UseSwaggerUI();
|
||||
}
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
|
||||
app.UseAuthorization();
|
||||
|
||||
app.MapControllers();
|
||||
|
||||
app.Run();
|
||||
Reference in New Issue
Block a user