Hey @derpycoder,
But I’m unable to run those LiveBook as individual apps, while also being connected to the main app.
A deployed app always uses the “Elixir standalone” runtime. In order to interact with your production node, you can connect using Node.set_cookie/2
+ Node.connect/2
and then use :erpc.call
to fetch information from that node. The primary reason is that an app requires Kino to run and we don’t want people to be adding more dependencies to their production apps. In general the isolated approach is preferable, the “Attached runtime” is primarily for debugging.
Why can’t we add LiveBook specific dependencies even in attached mode?
We install dependencies via Mix.install/2
, which can be called only once, so adding a dependency to the list wouldn’t be possible and we don’t know (nor want to) restart the connected node. Also production apps usually are releases and they don’t even have Mix
. With the approach I mentioned above, you can freely add dependencies, since the notebook is separate from the app.
Also, I noticed that Markdown doesn’t show up in the app!
Correct, in case of apps we treat Markdown cells as more of a documentation. You can use Kino.Markdown
to render content that should be a part of the app. We may have more configuration for this in the future, depending on the use cases we see : )