I have a livebook connected to an app (hosted on fly.io).
I wish to render charts and do some nice
Kino stuff. But I can’t install any of those in that livebook. So, Is it possible to send the data i retrieve from the
connected livebook to another livebook and do other charting etc stuff there.
Unfortunately not, or at least I don’t think so. I don’t love this as a solution, but I have a set of Livebook-related deps that I add at the bottom for my app in production.
Hey @TwistingTwists, instead of connecting Livebook directly to the app node (hence running code against that node), you can use the default runtime, then manually
Node.connect/1 to the app node and fetch data using
:erpc calls. This way you can use dependencies in the notebook as usual.
That’s a fair idea!
How do you pass cookie to
Node.connect/1 ? I need to specify the live book cookie as well.
You can set cookie for a specific node with
Node.set_cookie(name, cookie) and then
Node.connect(name) will use that cookie when connecting.
I need to specify the live book cookie as well.
set_cookie should be enough, but for the record there is
LIVEBOOK_COOKIE env var if you need it.