This application allows users to browse a list of servers for the game CS2D. It features a user-friendly interface and provides an API for retrieving server data in JSON format, making it easy to integrate with other applications. You can check out a live demo of the application here.
- Install geoipupdate on your system
apt install -y geoipupdate
- Generate a license key and configure
nano /etc/GeoIP.conf
AccountID your_account_id_here
LicenseKey your_license_key_here
DatabaseDirectory /usr/share/GeoIP
EditionIDs GeoLite2-Country
- Run the following command to update the GeoIP database
geoipupdate
- Add a crontab entry to update the GeoIP database twice a week
crontab -e
57 22 * * 0,4 geoipupdate >/dev/null 2>&1
- Clone repository
git clone https://github.com/ernestpasnik/cs2d-serverlist.git
- Configure environment variables
nano cs2d-serverlist/.env
HOST=0.0.0.0
PORT=3000
UDPHOST=0.0.0.0
UDPPORT=36963
USGNIP=81.169.236.243
USGNPORT=36963
COUNTRYDB=/usr/share/GeoIP/GeoLite2-Country.mmdb
- Install dependencies
cd cs2d-serverlist && npm install
- Run the application
node app.js
This project is licensed under the MIT License.