diff --git a/backend/Program.cs b/backend/Program.cs new file mode 100644 index 0000000..35c8ff9 --- /dev/null +++ b/backend/Program.cs @@ -0,0 +1,21 @@ +var builder = WebApplication.CreateBuilder(args); + +// Add services to the container. + +builder.Services.AddControllers(); +// Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi +builder.Services.AddOpenApi(); + +var app = builder.Build(); + +// Configure the HTTP request pipeline. +if (app.Environment.IsDevelopment()) +{ + app.MapOpenApi(); +} + +app.UseAuthorization(); + +app.MapControllers(); + +app.Run(); diff --git a/backend/Properties/launchSettings.json b/backend/Properties/launchSettings.json new file mode 100644 index 0000000..425bfa2 --- /dev/null +++ b/backend/Properties/launchSettings.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://json.schemastore.org/launchsettings.json", + "profiles": { + "backend": { + "commandName": "Project", + "launchBrowser": false, + "applicationUrl": "http://localhost:5000", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/backend/appsettings.Development.example.json b/backend/appsettings.Development.example.json new file mode 100644 index 0000000..48247da --- /dev/null +++ b/backend/appsettings.Development.example.json @@ -0,0 +1,13 @@ +{ + "Logging": { + "LogLevel": { "Default": "Information", "Microsoft.AspNetCore": "Warning" } + }, + "ConnectionStrings": { + "Postgres": "Host=aws-N-REGION.pooler.supabase.com;Port=5432;Database=postgres;Username=postgres.YOURPROJECTREF;Password=REPLACE_ME;SSL Mode=Require;Trust Server Certificate=true" + }, + "Supabase": { + "MetadataAddress": "https://YOURPROJECTREF.supabase.co/auth/v1/.well-known/openid-configuration", + "Issuer": "https://YOURPROJECTREF.supabase.co/auth/v1", + "Audience": "authenticated" + } +} diff --git a/backend/appsettings.json b/backend/appsettings.json new file mode 100644 index 0000000..29724ab --- /dev/null +++ b/backend/appsettings.json @@ -0,0 +1,6 @@ +{ + "Logging": { + "LogLevel": { "Default": "Information", "Microsoft.AspNetCore": "Warning" } + }, + "AllowedHosts": "*" +} diff --git a/backend/backend.csproj b/backend/backend.csproj new file mode 100644 index 0000000..eb5883c --- /dev/null +++ b/backend/backend.csproj @@ -0,0 +1,13 @@ + + + + net9.0 + enable + enable + + + + + + + diff --git a/backend/backend.http b/backend/backend.http new file mode 100644 index 0000000..49b12b7 --- /dev/null +++ b/backend/backend.http @@ -0,0 +1,6 @@ +@backend_HostAddress = http://localhost:5211 + +GET {{backend_HostAddress}}/weatherforecast/ +Accept: application/json + +###