Created
June 20, 2021 16:15
-
-
Save PatrickKalkman/6aec52bf57c718364eef8e24d1df0ae5 to your computer and use it in GitHub Desktop.
Controller that receives the health check request
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
[ApiController] | |
[Route("[controller]")] | |
public class HealthCheckController : ControllerBase | |
{ | |
private readonly ILogger<HealthCheckController> _logger; | |
public HealthCheckController(ILogger<HealthCheckController> logger) | |
{ | |
_logger = logger; | |
} | |
[HttpGet] | |
public IActionResult HealthCheck() | |
{ | |
// Check the health of your application | |
// e.g. perform query on the database and map the result | |
return Ok(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment