diff --git a/Project.MinimalAPI/TodoAPI/Program.cs b/Project.MinimalAPI/TodoAPI/Program.cs new file mode 100644 index 0000000..2594996 --- /dev/null +++ b/Project.MinimalAPI/TodoAPI/Program.cs @@ -0,0 +1,29 @@ +var builder = WebApplication.CreateBuilder(args); + +/* builder.Services.AddDbContext(options => options.UseSqlServer(builder.Configuration.GetConnectionString("Project"))); +builder.Services.AddScoped(); +builder.Services.AddScoped(); +builder.Services.AddScoped(); */ + + +// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle +builder.Services.AddEndpointsApiExplorer(); +builder.Services.AddSwaggerGen(); + +var app = builder.Build(); + +if (app.Environment.IsDevelopment()) +{ + app.UseSwagger(); + app.UseSwaggerUI(); +} +app.UseHttpsRedirection(); + +/* var commitAuthor = app.MapGroup("/commitAuthor").WithOpenApi(); +var commitFrequency = app.MapGroup("/commitFrequency").WithOpenApi(); */ + +app.MapGet("/", () => "Hello World!"); + +//app.MapGet("/{RepositoryPath}", async (string path, UserRepo repository) => await repository.FindAsync()); + + app.Run(); diff --git a/Project.MinimalAPI/TodoAPI/Properties/launchSettings.json b/Project.MinimalAPI/TodoAPI/Properties/launchSettings.json new file mode 100644 index 0000000..d876668 --- /dev/null +++ b/Project.MinimalAPI/TodoAPI/Properties/launchSettings.json @@ -0,0 +1,28 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:47606", + "sslPort": 44345 + } + }, + "profiles": { + "TodoAPI": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "applicationUrl": "https://localhost:7236;http://localhost:5058", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/Project.MinimalAPI/TodoAPI/TodoAPI.csproj b/Project.MinimalAPI/TodoAPI/TodoAPI.csproj new file mode 100644 index 0000000..bc27e0d --- /dev/null +++ b/Project.MinimalAPI/TodoAPI/TodoAPI.csproj @@ -0,0 +1,16 @@ + + + + net6.0 + enable + enable + true + + + + + + + + + diff --git a/Project.MinimalAPI/TodoAPI/appsettings.Development.json b/Project.MinimalAPI/TodoAPI/appsettings.Development.json new file mode 100644 index 0000000..0c208ae --- /dev/null +++ b/Project.MinimalAPI/TodoAPI/appsettings.Development.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + } +} diff --git a/Project.MinimalAPI/TodoAPI/appsettings.json b/Project.MinimalAPI/TodoAPI/appsettings.json new file mode 100644 index 0000000..10f68b8 --- /dev/null +++ b/Project.MinimalAPI/TodoAPI/appsettings.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*" +}