Skip to content

Instantly share code, notes, and snippets.

@donrestarone
Created December 23, 2020 23:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save donrestarone/59595cfc3680087f56e82d7b9aecba3d to your computer and use it in GitHub Desktop.
Save donrestarone/59595cfc3680087f56e82d7b9aecba3d to your computer and use it in GitHub Desktop.
phoenix controller file
defmodule WorkshopWeb.HomeController do
use WorkshopWeb, :controller
def index(conn, _params) do
render(
conn,
"index.html",
props: Jason.encode!(%{foo: "bar"})
)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment