Skip to content

Commit

Permalink
log stack trace on app stop
Browse files Browse the repository at this point in the history
  • Loading branch information
danpercic86 committed Dec 10, 2023
1 parent 9d09176 commit a936576
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions GdscBackend/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
var builder = WebApplication.CreateBuilder(args);
var services = builder.Services;
var configuration = builder.Configuration;

services.AddAutoMapper(typeof(MappingProfiles));

services.AddControllers();
Expand Down Expand Up @@ -50,6 +49,11 @@

app.UseCors("EnableAll");

app.Lifetime.ApplicationStopping.Register(() =>
{
Console.WriteLine(Environment.StackTrace);
});

app.UseRouting();

app.UseSwaggerMiddleware();
Expand All @@ -59,4 +63,4 @@

app.MapControllers();

app.Run();
app.Run();
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ services:
web:
build: .
ports:
- "8000:80"
- "8000:8080"
volumes:
- ./GdscBackend/appsettings.Local.json:/app/appsettings.json
- ./GdscBackend/appsettings.Development.json:/app/appsettings.json

0 comments on commit a936576

Please sign in to comment.