Files
nym/nym-statistics-api
Jędrzej Stuczyński 28b22f6b22 upgrade axum to 0.8.9 (and side deps) (#6808)
* upgrade axum to 0.8.9 (and side deps)

Bumps axum 0.7.5 → 0.8.9, axum-extra 0.9.4 → 0.12.6,
axum-client-ip 0.6.1 → 1.3.1, axum-test 16.2.0 → 20.0.0,
utoipa-swagger-ui 8.1 → 9.0.2.

* warn upon using fallback ip

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* chore: replace use of deprecated try_next()

* update console-subscriber to ensure single version of axum in the lock file

* removed unused axum-test dev-dep

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-05-22 15:39:33 +01:00
..
2025-05-28 10:23:11 +02:00

Nym-statistics-api

A simple API to collect and store statistics sent by nym-vpn-client.

Build instructions

The statistics API is backed by a PostgreSQL database so you'll need a PostgreSQL server running if you want to add migrations or add/modify SQL queries. I recommend https://postgresapp.com on MacOS, very easy to use. If you're on another OS, it's up to you.

Assuming your database is running at postgresql://user:password@host:port/database_name you'll likely need to run the following :

DATABASE_URL="postgresql://user:password@host:port/database_name"

# if you don't have an existing datase
sqlx database create --database-url $DATABASE_URL
sqlx migrate run --database-url $DATABASE_URL

# reset it if you messed with migrations while developping
sqlx database reset --database-url $DATABASE_URL

# or just run new migrations
sqlx migrate run --database-url $DATABASE_URL

# then prepare queries for offline build mode
cargo sqlx prepare --database-url $DATABASE_URL

This should allow cargo build without having any postgreSQL server running. Be sure to add the .sqlx directory to version control