Skip to content

Commit

Permalink
SPA checks for its dependences on healthcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
eiximenis committed Apr 7, 2017
1 parent a12a53b commit 97d8e80
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Web/WebSPA/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public static void Main(string[] args)
{
var host = new WebHostBuilder()
.UseKestrel()
.UseHealthChecks("/hc")
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
.UseStartup<Startup>()
Expand Down
5 changes: 4 additions & 1 deletion src/Web/WebSPA/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ public void ConfigureServices(IServiceCollection services)
{
services.AddHealthChecks(checks =>
{
checks.AddValueTaskCheck("HTTP Endpoint", () => new ValueTask<IHealthCheckResult>(HealthCheckResult.Healthy("Ok")));
checks.AddUrlCheck(Configuration["CatalogUrl"]);
checks.AddUrlCheck(Configuration["OrderingUrl"]);
checks.AddUrlCheck(Configuration["BasketUrl"]);
checks.AddUrlCheck(Configuration["IdentityUrl"]);
});

services.Configure<AppSettings>(Configuration);
Expand Down

0 comments on commit 97d8e80

Please sign in to comment.