Giter Club home page Giter Club logo

phoenix_live_view_example's Introduction

Demo

To start your Phoenix server:

  • Install dependencies with mix deps.get
  • Run mix setup to install and setup dependencies. It also runs migration to create users.
  • 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.

Where to start

Start reading the code from config/demo_web/router.ex.

The line

  live "/", PageLive, :index

defines a LiveView route (see [https://hexdocs.pm/phoenix_live_view/Phoenix.LiveView.Router.html]) to the code in lib/demo_web/live/page_live.ex.

Learn more

Main changes for phoenix 1.7.11

  • Routes.static_path -> ~p"..."
  • live_redirect -> <.link href={~p"..."}>...</.link>
  • link "text", to: "..." -> <.link href={~p"...}"}>
  • streams (phx-update="append" is deprecated)
  • lib/demo_web/templates/layout is now lib/demo_web/components/layouts
  • use of .simple_form and `.table from CoreComponents
  • use of Tailwind css with @apply directive
  • NimbleStrftime -> Calendar (merged in elixir)
  • a lot of changes from runnig mix phx.new demo :-)

I also moved to sqlite3 as it is just examples.

phoenix_live_view_example's People

Contributors

aforward avatar alexgaribay avatar benwilson512 avatar chrismccord avatar donapieppo avatar gazler avatar gregjopa avatar haroenv avatar heymackey avatar jeffweiss avatar joerichsen avatar josevalim avatar lau avatar ljzn avatar mcrumm avatar nathanl avatar olreim avatar rickclare avatar rmoorman avatar sfusato avatar wiserfirst 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.