First version of the new layout.
This commit is contained in:
18
DouwcoWebsite/Program.cs
Normal file
18
DouwcoWebsite/Program.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Add services to the container.
|
||||
builder.Services.AddControllers(); // For API controllers
|
||||
|
||||
var app = builder.Build();
|
||||
app.MapGet("/api/test", () => "test works!");
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
// No need for UseHttpsRedirection or UseHsts, as Nginx handles SSL.
|
||||
app.UseDefaultFiles(); // Enable default file serving
|
||||
app.UseStaticFiles(); // Serve static files from wwwroot
|
||||
app.UseRouting();
|
||||
app.UseAuthorization();
|
||||
|
||||
app.MapControllers(); // Map API controllers
|
||||
|
||||
app.Run();
|
||||
Reference in New Issue
Block a user