Add basic health check endpoint
This commit is contained in:
parent
559124460d
commit
aadada2084
@ -0,0 +1,22 @@
|
||||
package com.nisemoe.nise.controller
|
||||
|
||||
import org.springframework.http.ResponseEntity
|
||||
import org.springframework.web.bind.annotation.GetMapping
|
||||
import org.springframework.web.bind.annotation.RestController
|
||||
|
||||
data class HealthResponse(
|
||||
val healthy: Boolean,
|
||||
)
|
||||
|
||||
val healthResponse = HealthResponse(
|
||||
healthy = true,
|
||||
)
|
||||
|
||||
@RestController
|
||||
class HealthController {
|
||||
@GetMapping("/health")
|
||||
fun healthCheck(): ResponseEntity<HealthResponse> {
|
||||
return ResponseEntity.ok(healthResponse)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user