🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
32 lines
699 B
C#
32 lines
699 B
C#
using ColaFlow.API.Extensions;
|
|
using ColaFlow.API.Middleware;
|
|
using Scalar.AspNetCore;
|
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
|
|
// Register ProjectManagement Module
|
|
builder.Services.AddProjectManagementModule(builder.Configuration);
|
|
|
|
// Add controllers
|
|
builder.Services.AddControllers();
|
|
|
|
// Configure OpenAPI/Scalar
|
|
builder.Services.AddOpenApi();
|
|
|
|
var app = builder.Build();
|
|
|
|
// Configure the HTTP request pipeline
|
|
if (app.Environment.IsDevelopment())
|
|
{
|
|
app.MapOpenApi();
|
|
app.MapScalarApiReference();
|
|
}
|
|
|
|
// Global exception handler (should be first in pipeline)
|
|
app.UseMiddleware<GlobalExceptionHandlerMiddleware>();
|
|
|
|
app.UseHttpsRedirection();
|
|
app.MapControllers();
|
|
|
|
app.Run();
|