Skip to content

blakeyp/politicodds

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Politicodds

A simple web app which presents the latest betting odds data and % likelihood for a selection of political events fetched from the Betfair Exchange.

server directory houses the backend code to serve a JSON REST API for the frontend app to consume. Calls the Betfair Exchange API to retrieve and process odds data.

client directory houses the frontend code to serve a single-page responsive web app which calls the backend API on the fly.

Tech stack

Deployment

The backend API is deployed via Serverless Express (on top of AWS Lambda/HTTP API). The frontend app is deployed via Netlify.

Run locally

To run the app locally, first in the server directory create a .env file based off the .env.template - you'll need a Betfair account registered with an application key for the Betfair Exchange API.

After an npm install, run npm run build && npm start to compile and run the backend API. Then move over to the client directory, install again and fire up the frontend via npm start.

The backend server runs on localhost port 4000 while the frontend is hosted on port 3000.

About

Web app presenting betting odds data for political events

Topics

Resources

Stars

Watchers

Forks

Contributors