title: How to set conn.secret_key_base in a Phoenix application
body: <p>I'm getting the following error in my Phoenix application:</p>
  
  <p><code>cookie store expects conn.secret_key_base to be set</code></p>
  
  <p>It appears to be coming from the <code>|&gt; redirect(to: session_path(conn, :new))</code> line of this authenticate function in my PostController module:</p>
  
  <pre><code>  defp authenticate(conn, _opts) do
      if conn.assigns.current_user do
        conn
      else
        conn
        |&gt; put_flash(:error, "You must be signed in to post a project.")
        |&gt; redirect(to: session_path(conn, :new))
        |&gt; halt()
      end
    end  
  </code></pre>
  
  <p>Obviously this error means that conn.secret_key_base needs to be set. </p>
  
  <p>Where and how do I set this value?</p>