Skip to content

jcallin/got-death-draft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Game of Thrones Death Draft app

https://gotdeathdraft.tk

Data from S8 E5

WOW! You guys did it! All 5 top selections were killed off in the season finale!

Season 8 Episode 5
Season 8 Episode 5 Winners

Disclaimer: this app was hacked together over some hours in the final weeks of Season 8 of Game of Thrones. It does not contain high quality or readable code, but it works. I'm a back-end guy who knows some framework-level Javascript.

How to run

Installing

Packages are installed with yarn, run yarn in the root, client/, and server/ directories

Overview of the server design

  • The app is hosted on structure.sh, which allows running an Express app off the http/https ports (standard 80/443)
  • UI client pages are served off get /* which allows react-router to route to any page
  • post /api/putData handles users submitting their guesses off the main page
  • The app works as both a front and a back end this way!

Repo structure and running

  • The server is run from the top-level directory using npm run start
  • The client UI exists in the /client folder
  • You can run the whole app locally by running npm run start from the top level directory. Looking inside package.json you'll see that this first builds the client UI and then starts the server
  • You can build and run just the client UI by running npm run start from the /client directory. This will start a development server through webpack
  • Important: the client is currently hardcoded to post data to the server at https://gotdeathdraft.tk. I didn't bother setting up CORS and local back-end testing. You can replace this URL with wherever you are running the server.

Deploying

  • Create an account at structure.sh and set up credentials
  • From the top level directory, run structure deploy you-app-name make sure you have changed the url of the server as mentioned in the last bullet point. For example: if your app is hosted at https://my-death-draft-app-username.structure.sh, then you will have to hardcode the server as https://my-death-draft-app-username.structure.sh in the client UI before deploying.

About

Using data to predict who dies in the show's final episode

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published