Live View Todos Example

March 16, 2019 ยท View on GitHub

Live View Todos Example

Chris McCord's LiveView example repo with a Todos demo (based on the Users CRUD demo) added. I created the todos demo in order to discover and learn about LiveView and to take it for a test drive. The demo is based loosely on todo mvc, but completely server-side via LiveView.

After installing as instructed below, visit localhost:4000/todos from your browser.

Attributions

  • The other examples are all Chris McCord's. I copied his Users CRUD example as a starting place for the /todos demo and wrote the todo_-related code on top of that. If I were to do it over, I would have forked that repo to make this history explicit.
  • css from TodoMVC.

Demo

To start your Phoenix server:

  • Install dependencies with mix deps.get
  • Create and migrate your database with mix ecto.create && mix ecto.migrate
  • Install Node.js dependencies with cd assets && npm install
  • Start Phoenix endpoint with mix phx.server

Now you can visit localhost:4000 from your browser.

Ready to run in production? Please check our deployment guides.

Learn more