2024-12-23 09:12:26 +00:00
|
|
|
using presence.data.RemoteData.RemoteDataBase;
|
|
|
|
using presence_api.ServiceExtensions;
|
2024-11-20 17:50:01 +00:00
|
|
|
|
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
|
|
|
|
|
|
builder.Services.AddControllers();
|
|
|
|
builder.Services.AddDbContext<RemoteDatabaseContext>();
|
|
|
|
builder.Services.AddEndpointsApiExplorer();
|
|
|
|
builder.Services.AddSwaggerGen();
|
|
|
|
|
2024-12-23 09:12:26 +00:00
|
|
|
builder.Services.ConfigureGroup();
|
|
|
|
builder.Services.ConfigureAdmin();
|
|
|
|
builder.Services.ConfigurePresence();
|
|
|
|
|
2024-11-20 17:50:01 +00:00
|
|
|
var app = builder.Build();
|
|
|
|
|
2024-12-23 09:12:26 +00:00
|
|
|
// Configure the HTTP request pipeline.
|
2024-11-20 17:50:01 +00:00
|
|
|
if (app.Environment.IsDevelopment())
|
|
|
|
{
|
|
|
|
app.UseSwagger();
|
|
|
|
app.UseSwaggerUI();
|
|
|
|
}
|
|
|
|
|
|
|
|
app.MapControllers();
|
|
|
|
|
2024-12-23 09:12:26 +00:00
|
|
|
|
|
|
|
|
2024-11-20 17:50:01 +00:00
|
|
|
app.Run();
|
2024-12-23 09:12:26 +00:00
|
|
|
|
|
|
|
|