Last active
October 14, 2024 21:27
-
-
Save bruceharrison1984/e77536767af3536e14071137c944708f to your computer and use it in GitHub Desktop.
TinyHealthCheck Simple Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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