demos.tf frontend
  • Rust 42.8%
  • TypeScript 42.1%
  • CSS 13.2%
  • JavaScript 1%
  • Nix 0.9%
Find a file
2023-12-05 16:53:26 +01:00
.github/workflows docker ci 2023-11-26 17:11:23 +01:00
build cleanup 2023-11-26 14:55:14 +01:00
images embed kill icons 2023-11-24 19:52:59 +01:00
script load map boundary data from remote 2023-11-26 19:24:19 +01:00
src update issue link 2023-12-05 16:53:26 +01:00
style improve nojs messages 2023-11-26 17:26:22 +01:00
.envrc init repo 2023-04-05 19:55:09 +02:00
.gitignore jsx/solid bundle 2023-04-10 18:58:55 +02:00
Cargo.lock cache map list forever 2023-11-26 22:07:52 +01:00
Cargo.toml config from env 2023-11-25 00:17:14 +01:00
flake.lock flake build 2023-11-24 23:39:55 +01:00
flake.nix docker: fix steam login 2023-11-26 16:55:19 +01:00
package-lock.json edit wip 2023-11-24 22:42:25 +01:00
package.json edit wip 2023-11-24 22:42:25 +01:00
README.md readme 2023-11-26 17:26:09 +01:00
sqlx-data.json flake build 2023-11-24 23:39:55 +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)