Skip to content

Instantly share code, notes, and snippets.

@neslinesli93
Created January 2, 2020 20:35
Show Gist options
  • Save neslinesli93/e29c869db1971853c17349feaa916c4a to your computer and use it in GitHub Desktop.
Save neslinesli93/e29c869db1971853c17349feaa916c4a to your computer and use it in GitHub Desktop.
Main game controller
defmodule BreakoutexWeb.GameController do
use BreakoutexWeb, :controller
alias Phoenix.LiveView
alias BreakoutexWeb.Live.Game
def index(conn, _) do
opts = [
session: %{cookies: conn.cookies}
]
LiveView.Controller.live_render(conn, Game, opts)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment