Goal: have a personal blog, and try out another point in the 'modular app design with elixir' space. Designing OTP systems with elixir had some interesting ideas.
14 lines
352 B
Elixir
14 lines
352 B
Elixir
defmodule FirehoseWeb.PageController do
|
|
use FirehoseWeb, :controller
|
|
|
|
def home(conn, _params) do
|
|
recent_posts =
|
|
(Firehose.EngineeringBlog.recent_posts(3) ++
|
|
Firehose.ReleaseNotes.recent_posts(3))
|
|
|> Enum.sort_by(& &1.date, {:desc, Date})
|
|
|> Enum.take(6)
|
|
|
|
render(conn, :home, recent_posts: recent_posts)
|
|
end
|
|
end
|