Replies: 5 comments
-
Hey @djacobs7, apps always use the "Elixir standalone" runtime and the preferred approach is to connect to the app and use |
Beta Was this translation helpful? Give feedback.
-
Incrementally developing an admin page or mini data app is really ergonomic when my code is running in the context of our production node. I haven't tried it yet, but it feels like using It sounds like I can't have the breezy developer UX and deploy to app at the same time? Is there a workaround? If I include LB as a mix dependency in our production app, can I get the deploy to app polish on my LB-based screens somehow? |
Beta Was this translation helpful? Give feedback.
-
It seems like I share a major use case with the OP. Relatedly, I am regularly swapping the node attached to my LBs and dearly wishing the connection details were saved to a menu so it wasn't such a hassle. |
Beta Was this translation helpful? Give feedback.
-
We want to make this better by providing a remote node smart cell. But, if you are constantly swapping nodes, that's when the :erpc approach would be superior. Changing the node would be the matter of changing a variable, because it is just code. And you could even call multiple nodes at once. Anyway, we are aware there can be improvements. We are exploring alternatives before we drill down on a "one true way". :) |
Beta Was this translation helpful? Give feedback.
-
Thanks, @josevalim Workflows that allow you to improvise and make incremental progress as needed – and only as needed – are usually the most powerful. You seem to get that, and Livebook seems to get that. As I mentioned to Hugo I think last week on a Zoom, Livebook is fitting in for me in workflows that go: manual process ➡️ partial script ➡️ ops screen ➡️ mix boilerplate ➡️ app screen. And on top of that, it feels like Livebooks are probably enough for plenty of fully-fledged internal app screens...and maybe even certain types of commercial screens that I have in mind for work. The two things that seem like they might hinder my ideal flow are:
I can't at the moment spare the time for a fair demo of this workflow here, but what I can do is commit to Thanks for all you do 😎 |
Beta Was this translation helpful? Give feedback.
-
Hi,
I have a library of elixir code that my livebook app depends on. I am struggling to deploy an app, because it is difficult to connect to an already running elixir node.
My current workflow is like this:
Start the server like this:
iex --sname banana --cookie banana -S mix phx.server
Write code in a live book that depends on this library. I might do something like
email_form = Kino.Input.textarea("email", default: "[email protected]") |> Kino.Input.read()
require Ash.Query
user = Banana.User |> Ash.Query.filter(email: email )
user
When I am doing development, I click on the microchip, and then I click on 'configure' and I set the 'name' and 'cookie' and connect to my running session.
When I am ready to deploy my app, I click on the spaceship and then click 'Deploy'. This launches an app connected to a standalone elixir.
Then, I go to the app, click 'DEBUG' and then click on the microchip, and then set the name and cookie for the app. However, anytime I change my code an redeploy, I have to go through all these same steps.
QUESTIONS
Is there a way to automatically tell an app which name/cookie to use, in a way that will persist or be automatically set? Or do you have another suggested best practice for developing an app that depends on a library like this?
Beta Was this translation helpful? Give feedback.
All reactions