Added healthcheck route; upgraded Docker image

This commit is contained in:
Jef Roosens 2022-01-31 11:11:45 +01:00
parent e26e2746de
commit 21c8e28e64
Signed by untrusted user: Jef Roosens
GPG key ID: B580B976584B5F30
2 changed files with 34 additions and 3 deletions

View file

@ -25,6 +25,11 @@ fn is_pkg_name(s string) bool {
return s.contains('.pkg')
}
['/health'; get]
pub fn (mut app App) healthcheck() web.Result {
return app.text('Healthy')
}
// get_root handles a GET request for a file on the root
['/:filename'; get]
fn (mut app App) get_root(filename string) web.Result {