Initial API setup and basic program functioning
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
using Emergence.api.Extensions;
|
||||
using Emergence.services.Extensions;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Add services to the container.
|
||||
// Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi
|
||||
builder.Services.AddOpenApi();
|
||||
builder.Services.AddServices();
|
||||
builder.Services.AddEndpoints(typeof(Program).Assembly);
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
app.MapEndpoints();
|
||||
// Configure the HTTP request pipeline.
|
||||
if (app.Environment.IsDevelopment())
|
||||
{
|
||||
app.MapOpenApi("/openapi/emergence.yaml");
|
||||
}
|
||||
app.Run();
|
||||
Reference in New Issue
Block a user