livebook/lib/livebook_web/controllers/health_controller.ex
2021-10-18 18:07:18 +02:00

14 lines
335 B
Elixir

defmodule LivebookWeb.HealthController do
use LivebookWeb, :controller
def index(conn, _params) do
version = Application.spec(:livebook, :vsn) |> List.to_string()
conn
|> put_resp_header("Access-Control-Allow-Origin", "*")
|> json(%{
"application" => "livebook",
"version" => version
})
end
end