2024-11-16 08:29:24 +00:00
|
|
|
using data.RemoteData;
|
|
|
|
|
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
|
|
|
|
|
|
builder.Services.AddControllers();
|
2024-11-19 18:29:07 +00:00
|
|
|
builder.Services.AddDbContext<RemoteDatabaseContext>();
|
2024-11-16 08:29:24 +00:00
|
|
|
builder.Services.AddEndpointsApiExplorer();
|
|
|
|
builder.Services.AddSwaggerGen();
|
|
|
|
|
|
|
|
builder.Services.ConfigurateGroup();
|
|
|
|
|
|
|
|
var app = builder.Build();
|
|
|
|
|
|
|
|
if (app.Environment.IsDevelopment())
|
|
|
|
{
|
|
|
|
app.UseSwagger();
|
|
|
|
app.UseSwaggerUI();
|
|
|
|
}
|
|
|
|
|
|
|
|
app.UseHttpsRedirection();
|
|
|
|
app.MapControllers();
|
|
|
|
|
|
|
|
|
|
|
|
app.Run();
|