-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
63f22f5
commit bfac803
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
25 changes: 25 additions & 0 deletions
25
console/src/main/kotlin/app/accrescent/parcelo/console/routes/Health.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright 2024 Logan Magee | ||
// | ||
// SPDX-License-Identifier: AGPL-3.0-only | ||
|
||
package app.accrescent.parcelo.console.routes | ||
|
||
import io.ktor.http.HttpStatusCode | ||
import io.ktor.resources.Resource | ||
import io.ktor.server.application.call | ||
import io.ktor.server.resources.get | ||
import io.ktor.server.response.respond | ||
import io.ktor.server.routing.Route | ||
|
||
@Resource("/") | ||
class Health | ||
|
||
fun Route.healthRoutes() { | ||
basicHealthRoute() | ||
} | ||
|
||
fun Route.basicHealthRoute() { | ||
get<Health> { | ||
call.respond(HttpStatusCode.OK) | ||
} | ||
} |