Skip to content

Instantly share code, notes, and snippets.

@bruceharrison1984
Last active October 14, 2024 21:27
Show Gist options
  • Save bruceharrison1984/e77536767af3536e14071137c944708f to your computer and use it in GitHub Desktop.
Save bruceharrison1984/e77536767af3536e14071137c944708f to your computer and use it in GitHub Desktop.
TinyHealthCheck Simple Example
public static IHostBuilder CreateHostBuilder(string[] args)
{
var processStartTime = DateTimeOffset.Now;
return Host.CreateDefaultBuilder(args)
.ConfigureServices((hostContext, services) =>
{
services.AddHostedService<Worker>();
services.AddBasicTinyHealthCheckWithUptime(config =>
{
config.Port = 8081;
config.UrlPath = "/healthz";
return config;
});
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment