Merge branch '58-reporting-add-health-endpoint-to-service' into 'master'
authorJan Vales (Someone) <jan.vales@tuwien.ac.at>
Wed, 16 Jan 2019 23:54:28 +0000 (00:54 +0100)
committerJan Vales (Someone) <jan.vales@tuwien.ac.at>
Wed, 16 Jan 2019 23:54:28 +0000 (00:54 +0100)
Resolve "reporting: add /health endpoint to service"

Closes #58

See merge request aic18/G6T4!39

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();
         }