Init
This commit is contained in:
commit
b01c097562
22 changed files with 1439 additions and 0 deletions
33
InkForge.Api/Program.cs
Normal file
33
InkForge.Api/Program.cs
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
using Microsoft.AspNetCore.Identity;
|
||||
|
||||
using InkForge.Api.Data;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Add services to the container.
|
||||
|
||||
builder.Services.AddControllers();
|
||||
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
|
||||
builder.Services.AddEndpointsApiExplorer();
|
||||
builder.Services.AddSwaggerGen();
|
||||
builder.Services.AddIdentityApiEndpoints<IdentityUser>()
|
||||
.AddEntityFrameworkStores<ApiDbcontext>();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
if (app.Environment.IsDevelopment())
|
||||
{
|
||||
app.UseSwagger();
|
||||
app.UseSwaggerUI();
|
||||
}
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
|
||||
app.UseAuthorization();
|
||||
|
||||
app.MapIdentityApi<IdentityUser>();
|
||||
|
||||
app.MapControllers();
|
||||
|
||||
app.Run();
|
||||
Loading…
Add table
Add a link
Reference in a new issue