source: iknow-api/Program.cs@ 618be76

Last change on this file since 618be76 was 618be76, checked in by imbrsk <boris696boris@…>, 11 months ago

Implement user management features with database integration

  • Property mode set to 100644
File size: 632 bytes
RevLine 
[618be76]1using Microsoft.EntityFrameworkCore;
2
[c11d3a3]3var builder = WebApplication.CreateBuilder(args);
4
5// Add services to the container.
6
7builder.Services.AddControllers();
8// Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi
9builder.Services.AddOpenApi();
10
11var app = builder.Build();
12
13// Configure the HTTP request pipeline.
14if (app.Environment.IsDevelopment())
15{
16 app.MapOpenApi();
17}
18
[618be76]19builder.Services.AddDbContext<AppDbContext>(options =>
20 options.UseNpgsql(builder.Configuration.GetConnectionString("DefaultConnection")));
21
22
[c11d3a3]23app.UseHttpsRedirection();
24
25app.UseAuthorization();
26
27app.MapControllers();
28
29app.Run();
Note: See TracBrowser for help on using the repository browser.