ajout projet backend vide
This commit was merged in pull request #8.
This commit is contained in:
26
src/LittleTown.Api/Program.cs
Normal file
26
src/LittleTown.Api/Program.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Add services to the container.
|
||||
// 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.MapGet("/helloWorld", () =>
|
||||
{
|
||||
return "Hello World";
|
||||
})
|
||||
.WithName("HelloWorld")
|
||||
.WithOpenApi();
|
||||
|
||||
app.Run();
|
||||
Reference in New Issue
Block a user