-
Notifications
You must be signed in to change notification settings - Fork 4
/
readme.txt
42 lines (31 loc) · 1.53 KB
/
readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
x-server-stats
A simple web server(and library) to display server stats over HTTP and Websockets/SSE or stream it to other systems. x-server(in x-server-stats) is not to be confused with X Window System.
=====================================================
Getting started
=====================================================
-----------------------------------------------------
- Installing the crate
$ cargo install x-server-stats
-----------------------------------------------------
-----------------------------------------------------
- Setting up environment variables
You need to export below environment variables to run the server.
The environment variables prefixed with `PG` are for PotsgreSQL database. Currently, only PostgreSQL is supported for storing stats.
export SERVER_ADDR=localhost:8082
export PG__USER=PG_USERNAME
export PG__PASSWORD=PG_PASSWORD
export PG__HOST=PG_HOST_URL
export PG__PORT=5432
export PG__DBNAME=PG_DB_NAME
export PG__POOL__MAX_SIZE=20
export BASE_ADDR=http://localhost:8082
-----------------------------------------------------
-----------------------------------------------------
- Building(and running) the application
Before running the application, you need to build it. You can do this by running the following command:
- $ cargo build --release
Run the binary with the following command:
- $ ./target/release/x-server-stats
Running the application directly. You can run the application directly by running the following command:
- $ cargo run --release
-----------------------------------------------------