Files
livebook/learn_livebook_api.livemd
2025-08-20 11:34:38 +08:00

449 B

livebook api

Mix.install([
  {:kino, "~> 0.16.1"},
  {:plug, "~> 1.18"}
])

Section

https://news.livebook.dev/livebook-0.13-expose-an-http-api-from-your-notebook-2wE6GY

Kino.Proxy.listen(fn conn ->
  Plug.Conn.send_resp(conn, 200, "hello world!")
end)

replace ip address and port numbers of livebook server

curl -L "http://ipaddress:port/proxy/sessions/4gqhbukjeigg5ht4zphpi7gihyoyl247x2rhcs63nnsd2dyj"