demos.tf frontend
  • Rust 42.8%
  • TypeScript 42.1%
  • CSS 13.2%
  • JavaScript 1%
  • Nix 0.9%
Find a file
2025-05-23 13:20:03 +02:00
.forgejo/workflows ci updates 2025-05-23 12:49:05 +02:00
.sqlx prepare for private demos 2025-04-02 20:37:11 +02:00
build tracing updates 2025-05-23 13:03:39 +02:00
images sapper icon 2024-12-08 15:38:15 +01:00
nix prepare for private demos 2025-04-02 20:37:11 +02:00
script tweak player hightlight 2024-12-22 16:01:38 +01:00
src update contact link 2025-05-23 13:20:03 +02:00
style highlight player dot/spec on hover 2024-12-22 15:56:34 +01:00
.envrc init repo 2023-04-05 19:55:09 +02:00
.gitignore swc updates 2024-06-07 22:47:28 +02:00
build.rs style fixes 2024-12-01 15:05:31 +01:00
Cargo.lock tracing updates 2025-05-23 13:03:39 +02:00
Cargo.toml tracing updates 2025-05-23 13:03:39 +02:00
docker.nix flake update 2025-03-17 17:09:26 +01:00
flake.lock ci updates 2025-05-23 12:49:05 +02:00
flake.nix ci updates 2025-05-23 12:49:05 +02:00
package-lock.json add ubers and building destruction in event filter 2024-12-08 15:38:29 +01:00
package.json add ubers and building destruction in event filter 2024-12-08 15:38:29 +01:00
README.md flake rework 2024-11-21 15:03:38 +01:00
rust-toolchain.toml flake rework 2024-11-21 15:03:38 +01:00

demos.tf

CI

Frontend code for demos.tf, see also the api code for the api backend.

Docker image

A prebuild docker image exist in the docker hub.

Building

Rust and npm are required to build the project.

Using nix

For systems with nix, a flake is provided to ease building, simply running

nix build .#frontend

will build the entire project.

Without nix

If you don't have make available you can build the project without it.

npm ci
cargo b --release

Running

Once build, the binary can be run with

frontend <path to config.toml>

Configuration

[listen]
# ip and port to listen on
address = "127.0.0.1"
port = 7001
# or alternativelly, a socket to listen on
# path = "/run/frontend.sock"

[site]
# where this site can be found
url = "http://example.com/"
# url of the api server (https://github.com/demostf/api), defaults to "https://api.demos.tf/"
api = "https://api.example.com/"
# url of the map data server (https://github.com/demostf/maps), defaults to "https://maps.demos.tf/"
maps = "https://maps.example.com/"

[database]
hostname = "db.example.com"
username = "demostf"
password = "XXXXXXXXXX"

Alternatively, the configuration can be proved as environment variables in the form of ${SECTION}_${ITEM} (e.g. LISTEN_ADDRESS=127.0.0.1)