Trivia is an experiment with Phoenix LiveView. https://phx-trivia.gigalixirapp.com/.
The process to build this app in summary was divided in 6 steps:
Modules to define the datastructure to play a trivia
A GenServer to maintain the state of the application
A Dynamic Supervisor link the games
A live view definition integration and a definition of a template
Some refactoring (still far from what I want)
Add bulma css to style
"test everything!!!, improve UI, Refactor code, etc.etc. The main goal was to use live view, and it has been accomplished"
About the game
Trivia is getting 5 Computer/IT questions from
the players can join to other trivias on the waiting period.
On the bottom of the page are diplayed the point and positions of the players during the game.
The player(s) with the higher score are the winners of the game.
About the app
https://github.com/phoenixframework/phoenix_live_view it's awesome!
The application can befound at:
To start your Phoenix server locally:
- Have elixir installed :)
- Clone the repo with
git clone https://github.com/ramortegui/phoenix_trivia
- Install dependencies with
- Install Node.js dependencies with
npm install --prefix assets
- Start Phoenix endpoint with
Now you can visit
localhost:4000 from your browser.