diff --git a/src/Program.cs b/src/Program.cs index 9abf9a6..9d76c91 100644 --- a/src/Program.cs +++ b/src/Program.cs @@ -36,7 +36,6 @@ public static void Main(string[] args) { await context.Response.WriteAsync("Communication with gRPC endpoints must be made through a gRPC client. To learn how to create a client, visit: https://go.microsoft.com/fwlink/?linkid=2086909"); }); }); - app.Run(); // Add a middleware to catch exceptions and stop the host gracefully app.Use(async (context, next) => { @@ -50,5 +49,7 @@ public static void Main(string[] args) { lifetime?.StopApplication(); } }); + + app.Run(); } } \ No newline at end of file