mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-01-31 03:07:53 +08:00
2a338b6b83
* Detect if Livebook or another application is running on the given port * Use json/2 * Print error when the port is taken
12 lines
270 B
Elixir
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
|