Giter Club home page Giter Club logo

todo_live_view's Introduction

TodoLiveView

A simple TodoList application in Elixir, built with Phoenix 1.7.7 and LiveView 0.19.0 which are the latest versions included, as of December 2023, when generating a new application with the command:

mix phx.new todo_live_view

This application is heavily inspired this tutorial:

https://dev.to/collinewait/how-to-build-a-phoenix-liveview-todo-list-app-with-testing-29n4,

Basically it's an upgrade of that tutorial, originally implemented with Phoenix 1.6.14 and LiveView 0.17.5

The main differences are:

  • different layout for live views folders (e.g. lib/todo_live_view_web/live/todo_live instead of lib/todo_live_view_web/live)
  • different usage of live view components (e.g. <.input type="checkbox" ... instead of <%= checkbox(... )
  • styled with Tailwind

Development

Prerequisites

  1. You need Elixir, Mix and Phoenix installed.

    See: https://hexdocs.pm/phoenix/installation.html

  2. Then, you need a Postgres db to store your to-dos.

    A docker-compose.yml file has been added to the project to launch a Postgres instance locally.

    • Launch it with docker-compose up -d
    • Log into the pgAdmin console http://localhost:5050 and create 2 new databases:
      • todo_live_view_dev
      • todo_live_view_test

Start Phoenix

To start your Phoenix server:

  • Run mix setup to install and setup dependencies

  • Start Phoenix endpoint with mix phx.server or inside IEx with iex -S mix phx.server

Now you can visit localhost:4000 from your browser.

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

Learn more

todo_live_view's People

Contributors

csarnataro avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.