Skip to content

sentclose/sentc-api

Repository files navigation

Sentc server

From sentclose

This is the server api which manages the user, groups and keys. It comes with mysql/mariadb or sqlite support.

Commands

Default with maria db

Running the server

cargo run

Running release

cargo run --release

Integration tests. A maria db connection is needed.

cargo test  --test '*' -- --test-threads=1

Unit tests

cargo test --lib -- --test-threads=1

Test all

cargo test  -- --test-threads=1

Sqlite

Running the server

cargo run --features=sqlite --no-default-features

Running release

cargo run --features=sqlite --no-default-features --release

Integration tests. A path to the sqlite db is needed in as env

cargo test --features=sqlite --no-default-features  --test '*' -- --test-threads=1

Unit tests

cargo test --lib --features=sqlite --no-default-features -- --test-threads=1

Test all

cargo test --features=sqlite --no-default-features -- --test-threads=1

Dev

For dev, it is recommended to compile sqlite into a new target dir.

cargo run --features=sqlite --no-default-features --target-dir=target_sqlite