This is the server component of an implementation of the game Timeline.
It runs in tandem with its companion Ember.js client
You can see this project in action here
-
Install Postgres
See the Postgres Installation Guide. If you're on Mac, Postgress.app is another easy option.
The default database configuration in
config/dev.exs
should work (username ofpostgres
, password shouldn't matter).If you want to create a new user (role), use the command:
> createuser -d someUserName --pwprompt
the
-d
option gives this role database create rights and you will be prompted for a password. After the role has been created, edit the databaseusername
andpassword
fields inconfig/dev.exs file
-
Install dependencies
phoenix-timeline> mix deps.get
-
Create and migrate your database
phoenix-timeline> mix ecto.create && mix ecto.migrate
-
Start the server
phoenix-timeline> mix phoenix.server
-
Install and start the Timeline Ember client as instructed there
- Official website: http://www.phoenixframework.org/
- Guides: http://phoenixframework.org/docs/overview
- Docs: http://hexdocs.pm/phoenix
- Mailing list: http://groups.google.com/group/phoenix-talk
- Source: https://github.com/phoenixframework/phoenix
Game
has-many players
has-many cards
has-many turns
belongs-to creator (player)
belongs-to winner (player)
Player
belongs-to game
has-many turns
(has-one user)
(as some point Player will be a relation btw game and user. So a real person
would be a User who be multiple players each in a 1-to-1 relationship to a game)
Card
Turn
belongs-to player
belongs-to card
belongs-to game