INitial work

This commit is contained in:
Ben Ramey
2022-07-24 22:12:30 -05:00
parent ecc5710048
commit be125ec5df
23 changed files with 3263 additions and 0 deletions

38
Program.cs Normal file
View File

@@ -0,0 +1,38 @@
using Microsoft.OpenApi.Models;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddRazorPages();
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen(c => {
c.SwaggerDoc("v1", new OpenApiInfo { Title = "ForgetMeNot API", Description = "API for ForgetMeNot!", Version = "v1" });
});
var app = builder.Build();
app.UseSwagger();
app.UseSwaggerUI(c => {
c.SwaggerEndpoint("/swagger/v1/swagger.json", "ForgetMeNot API v1");
});
app.MapGet("/api/v1/", () => "Hello World!");
// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
{
app.UseExceptionHandler("/Error");
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseRouting();
app.UseAuthorization();
app.MapRazorPages();
app.Run();