Skip to content

Retroprogram/bfbc2-stats

 
 

Repository files navigation

Prerequisites

  1. Docker
  2. NodeJS
  3. Yarn

I have tested the build with NodeJS v7.2.0, Yarn v0.17.9 and Docker v1.13.1-rc1.

Installation

After cloning the repo and installing the prerequisiets, you need to setup the database with the player stats. Copy the db-dump.sql file into bfbc2-stats/db-dump/. Now run docker-compose up in the root folder (where the docker-compose.yml file is) to install a mysql db and import the db-dump.sql as new database.

After a few mins you can connect to the database under localhost with the credentials root:pass.

After the database is ready, run yarn install in the root folder (where package.json is) to install all dependencies.

How to run

After initally running docker-compose up there is a container up and running with a MySQL database in it. Run docker ps -a to list all containers. You can use docker start/stop with the container id to run/stop the container. The data (in this case database) remains in the container even while shutdown.

To start the backend run yarn run backend.

To start the frontend run yarn run serve.

Backend

After starting the backend you can browse to http://localhost:8080/docs and checkout the documentation of the API.

Frontend

After starting the frontend you can browser to http://localhost:8080/webpack-dev-server/ to see the actual stats page. While webpack-dev-server is running the page will get reloaded automatically upon file change.

About

A stats system for Battlefield Bad Company 2, created and maintained by DU4.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 74.7%
  • HTML 22.6%
  • CSS 2.7%