Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackzmc authored Nov 14, 2024
1 parent 2d475f2 commit 32098f2
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

NOTE: This is more of a custom personal project that I decided to have open sourced - limited support and some features will not work as they rely on my custom systems (such as "Play Style" and "Rating" in user overview)

A plugin for l4d2 that records statistics for all players on the server and shows it publicly on a website. This is a 3-part project.
* Frontend UI
* Backend API
A plugin for l4d2 that records statistics for all players on the server and shows it publicly on a website. This was designed for co-op, and so versus and other gamemodes may not track statistics correctly.

This is a 3-part project:
* Frontend UI (vue.js)
* Backend API (express.js server)
* Sourcemod Plugin

Requires a MySQL server for statistic storage.
Expand All @@ -14,14 +16,20 @@ Demo: https://stats.jackz.me
### Building
You can build the sourcemod plugin from the scripting/ folder.

The webserver is built using VueJS and you can just cd to the folder and run `<yarn/npm run> build`
The webserver is built using VueJS and you can just cd to the folder and run `<yarn/npm> install && <yarn/npm run> build`

The api server, just install npm packages with yarn or npm, and run index.js. You do need to set the following environment variables to hook to mysql:
`MYSQL_USER, MYSQL_DB, MYSQL_PASSWORD, MYSQL_HOST`
Set the port (default 8080) with `WEB_PORT`
```
MYSQL_HOST=
MYSQL_USER=l4d2
MYSQL_DB=l4d2
MYSQL_PASSWORD=
# optional
WEB_PORT=8080 #default
```

The demo server is setup as followed:
1. The UI is served from static files (/var/www/stats.l4d2.jackz.me)
1. The UI is served from static files (/var/www/)
2. /api/ route is proxied to the api server running locally

Example nginx configuration: (implies nodejs server is running on same server on port 8989, set WEB_PORT env for that)
Expand Down

0 comments on commit 32098f2

Please sign in to comment.