Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions web/controllers/greet_controller.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
defmodule Blog.GreetController do
use Blog.Web, :controller

def hello(conn, _params) do
render conn, "hello.html"
end
end
1 change: 1 addition & 0 deletions web/router.ex
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ defmodule Blog.Router do
pipe_through :browser # Use the default browser stack

get "/", PageController, :index
get "/greet", GreetController, :hello
end

# Other scopes may use custom stacks.
Expand Down
1 change: 1 addition & 0 deletions web/templates/greet/hello.html.eex
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<h1>Hello World</h1>
3 changes: 3 additions & 0 deletions web/views/greet_view.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
defmodule Blog.GreetView do
use Blog.Web, :view
end