add healthchecks
authorFabian Eichhorner <fabian.eichhorner@gmail.com>
Wed, 16 Jan 2019 19:43:23 +0000 (20:43 +0100)
committerFabian Eichhorner <fabian.eichhorner@gmail.com>
Wed, 16 Jan 2019 19:43:23 +0000 (20:43 +0100)
service-reporting/Startup.cs

index 9cb03518cb6d6863d992e5b8ce1f903a3c491fe5..d719306478fb2d2d1ab004645c09a6f175f80039 100644 (file)
@@ -32,6 +32,8 @@ namespace PdfService
             services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
 
             services.AddSingleton(typeof(IConverter), new SynchronizedConverter(new PdfTools()));
+
+            services.AddHealthChecks();
         }
 
         // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
@@ -47,6 +49,7 @@ namespace PdfService
                 app.UseHsts();
             }
 
+            app.UseHealthChecks("/health");
             app.UseHttpsRedirection();
             app.UseMvc();
         }