redirect route in phoenix

Published on

1 min read

This is how I did a simple redirect from / to /products in a phoenix controller:

  def index(conn, _params) do
redirect(conn, to: "/products")
end