Search code examples
elixirphoenix-frameworkphoenix-live-view

How can I add LiveView to an existing Elixir/Phoenix app?


I want to change a form in my existing Phoenix app to use LiveView so I can take advantage of the better image uploading capability described here. However the documentation that I've seen only talks about running mix phx.new my_app --live to set it up. How can I add it to an existing app instead?


Solution

  • The official installation guide is actually mostly about how to add it to an existing Phoenix project (everything except the first paragraph basically):

    If you are using earlier Phoenix versions or your app already exists, keep on reading.