Tutorial on how to create blog using Phoenix?

Anybody knows any tutorial on how to create a blog in Phoenix?

1 Like


Depends on the complexity of the blog you want. Here’s a simple one:

$ mix phx.gen.html Accounts User users name:string
$ mix phx.gen.html Content Post posts title:string:unique body:text author_id:references:users
$ mix phx.gen.html Content Post.Comment comments body:text author_id:references:users post_id:references:posts

This may help - I made a screencast talking about Phoenix Contexts and as part of that I build a simple blog (with comments).


And it just works :slight_smile:

1 Like

Have a look at https://alchemist.camp too, it walks you through different steps to create a basic CRM - it helped me a lot in understanding how to build many-to-many relationships and preloading (unified tagging episode)