livebook/lib/livebook_web/controllers/health_controller.ex
Jonatan Kłosko 2a338b6b83
Detect if Livebook or another application is running on the given port (#530)
* Detect if Livebook or another application is running on the given port

* Use json/2

* Print error when the port is taken
2021-08-30 23:23:05 +02:00

12 lines
270 B
Elixir

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