add health check

This commit is contained in:
Elizabeth Hunt 2023-10-09 18:21:36 -06:00
parent 750531368b
commit 9560ced683
Signed by: simponic
GPG Key ID: 52B3774857EB24B1
2 changed files with 7 additions and 1 deletions

View File

@ -392,6 +392,12 @@ defmodule Chessh.Web.Endpoint do
)
end
get "/health" do
conn
|> put_resp_content_type("text/plain")
|> send_resp(200, "healthy")
end
match _ do
send_resp(conn, 404, "Route undefined")
end

View File

@ -5,7 +5,7 @@ defmodule Chessh.SSH.AuthTest do
@localhost '127.0.0.1'
@localhost_inet {{127, 0, 0, 1}, 1}
@key_name "The Gamer Machine"
@valid_user %{username: "lizzy#0003", password: "password", discord_id: "3"}
@valid_user %{username: "lizzy", password: "password", discord_id: "3"}
@client_test_keys_dir Path.join(Application.compile_env!(:chessh, :key_dir), "client_keys")
@client_pub_key 'id_ed25519.pub'