Change the default phoenix page

In Phoenix the PageController seem to be the default controller with the function :index which renders the index.html.eex for the port

Lets say i want instead to load SessionController :new function when i visit What is the best way to implement this?

I tried this approach in PageController but it seemed not to work

def index(conn, _params) do
    |> redirect(to: session_path(conn, :new))

You can modify your router.ex to point / wherever You want.

I must say that was too fast great. Back to your comment which part exactly do i modify in the file?

Maybe like this…

  scope "/", NextWeb do
    # Use the default browser stack

    get("/", SessionController, :new)

Yeah this has worked for me well. Thanks @kokolegorille for your quick solution