Add basic logic on route /, including list stories, create story, and join story.
Move logic in app.js to proper route
Add config.js for general data like PORT or SERVER, make it easier to reconfigure on production.
Notes:
The choice of names (game, playerID,...) is based on boardgame.io's names to not cause confusion through out codes. The terminology such as story, writer will only be shown to end users.
The process of finding an available slot to join a game is currently not supported by the server api, so we have to loop the requests from the client til found one (check joinGameRequest()). This logic can be change once boardgame.io upgrades their api.
Todo:
After a successful join request, we get the playerCredentials. Next step is to navigate to /story after users click join, with the playerCredentials and other game info.
Fixes #26
Changes:
/
,/story
/
, including list stories, create story, and join story.app.js
to proper routeconfig.js
for general data likePORT
orSERVER
, make it easier to reconfigure on production.Notes:
joinGameRequest()
). This logic can be change once boardgame.io upgrades their api.Todo:
playerCredentials
. Next step is to navigate to/story
after users click join, with theplayerCredentials
and other game info./story