start core project
rename project to API
This commit is contained in:
parent
e43578b36d
commit
ba7ac36920
11 changed files with 59 additions and 64 deletions
31
SurveyBackend/SurveyBackend.API/Program.cs
Normal file
31
SurveyBackend/SurveyBackend.API/Program.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
namespace SurveyBackend;
|
||||
|
||||
public class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Add services to the container.
|
||||
builder.Services.AddAuthorization();
|
||||
|
||||
// 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.UseAuthorization();
|
||||
|
||||
app.Run();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue