Tutorial on how to create blog using Phoenix?

phoenix
phoenix-14
#1

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

1 Like
#2

:wave:

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
6 Likes
#3

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

3 Likes
#4

And it just works :slight_smile:

1 Like
#5

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)

1 Like