项目作者: jasbrake

项目描述 :
The backend service for AC Tracker
高级语言: Go
项目地址: git://github.com/jasbrake/actracker.git
创建时间: 2019-07-24T00:06:52Z
项目社区:https://github.com/jasbrake/actracker

开源协议:

下载


AC Tracker

A service that periodically pings AssaultCube servers, provides an API for live games and tracks past games.

The frontend is located in a separate repository here.

Features

  • Live game details
  • Past games and player scores saved to DB

Future Features

  • Search (by name, server, IP range, date range)
  • Show past games by server
  • Player ladder
  • Highlight and separate competitive games (“inters”) and tournaments from public games
  • Parse clan tags out of names to show online clan members

API

All endpoints return JSON.

/servers

Returns a list of servers with active games along with the live game details.

/player/:name

Returns a list of recent games for a player name.

/player_autocomplete

Expects a query parameter q.

Returns a list of player names that start with the query.

Development

In order to run for development, create a .env file with your environment variables then run ./dev.sh.

Example .env file:

  1. # APP
  2. APP_PORT=3000
  3. PINGER_COUNT=50
  4. SLEEP_SECONDS=10
  5. MAX_SLEEP_SECONDS=300
  6. #GIN_MODE="release"
  7. # DB
  8. DB_HOST="localhost"
  9. DB_PORT=5432
  10. DB_USER="user"
  11. DB_PASSWORD="password"
  12. DB_NAME="actracker"
  13. DB_SSLMODE="require"
  14. # GEOIP
  15. GEOIP_DB_PATH="/usr/share/GeoIP/GeoLite2-Country.mmdb"