I am having trouble with even the most basic of session operations in Phoenix. For example, if I generate the stock Phoenix (1.4) app, and the only change I make is to page_controller.ex, the index action of which now looks like:
def index(conn, _params) do
put_session(conn, :franch, "foo")
text(conn, "session is: #{get_session(conn, :franch)}")
end
when I start the server and navigate to that page, I see:
session is:
Is there some additional configuration that I need to do in order to be able to store values in the session? The stock app fetches the session in the browser pipeline so I was assuming there's no more to do, but maybe I'm wrong?
conn
is immutable. Tryconn = put_session(conn, :franch, "foo")
– AbM