A Blog project using the Talon Framework.
git clone https://github.com/talonframework/talon_blog_demo.git
cd talon_blog_demo
mix deps.get && cd assets && npm install && cd .. && mix ecto.setup && mix phx.server
Visit http://localhost:4000/talon/blogs
in your browser.
mix phx.new talon_blog_demo
cd talon_blog_demo
mix ecto.create
mix phx.gen.context Accounts User users first_name last_name username email active:boolean
mix phx.gen.context Blogs Blog blogs name description:text active:boolean user_id:references:accounts_users
- Add the
belongs_to
andhas_many
to theBlog
andUser
schemas
mix phx.gen.context Blog as Post posts title body:text published:boolean views:integer blog_id:references:blogs_blog
- Add the
belongs_to
andhas_many
to thePost
andBlog
schemas
- Fill out the
seeds.exs
file mix run priv/repo/seeds.exs
- Edit the
mix.exs
file. Addtalon
andfaker
deps mix deps.get
mix talon.new
- Follow the instructions printed
- Add the pagination to
repo.ex
- Add the talon routes to
router.ex
- Edited the
brunch-config.js
file. Copied the boilerplate sections, pasted, and uncommented.
mix talon.gen.resource Accounts.User
mix talon.gen.resource Blogs.Blog
mix talon.gen.resource Blogs.Post
- Edit the
config/talon.exs
file and add the resources per instructions