This is the backend for CS2KZ that is responsible for storing records, maps, servers, etc. and exposing them to the outside world. It is currently under development together with cs2kz-metamod.
In order to run locally, you will have to install Docker. This is the recommended way to run the database, as well as the API itself if you don't have Rust installed. If you have Rust installed (or want to install it: rustup), then you can run the API itself outside of docker as well.
First, clone this repository:
$ git clone https://github.com/KZGlobalTeam/cs2kz-api
Then setup environment variables:
$ cp .env.example .env
$ cp .env.docker.example .env.docker
Now make sure the database is running:
$ docker compose up -d cs2kz-database
If you want to run the API in docker as well, run:
$ docker compose up cs2kz-api
If you want to run natively, you can use cargo
:
$ cargo run
If you want to contribute, have a look at CONTRIBUTING.md!