defmodule LivebookWeb.SessionLive.ElixirStandaloneLive do use LivebookWeb, :live_view alias Livebook.{Session, Runtime} @impl true def mount(_params, %{"session_id" => session_id, "current_runtime" => current_runtime}, socket) do if connected?(socket) do Phoenix.PubSub.subscribe(Livebook.PubSub, "sessions:#{session_id}") end {:ok, assign(socket, session_id: session_id, output: nil, current_runtime: current_runtime)} end @impl true def render(assigns) do ~L"""
Start a new local node to handle code evaluation. This is the default runtime and is started automatically as soon as you evaluate the first cell.
<%= if @output do %> <% end %>