https://github.com/sentclose/sentc-api
https://github.com/sentclose/sentc-api
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/sentclose/sentc-api
- Owner: sentclose
- License: agpl-3.0
- Created: 2022-07-16T20:19:17.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2024-08-03T12:17:11.000Z (almost 2 years ago)
- Last Synced: 2024-08-03T22:48:38.240Z (almost 2 years ago)
- Language: Rust
- Homepage: https://sentc.com/
- Size: 1.93 MB
- Stars: 4
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
````shell
cargo run
````
Running release
````shell
cargo run --release
````
Integration tests. A maria db connection is needed.
````shell
cargo test --test '*' -- --test-threads=1
````
Unit tests
````shell
cargo test --lib -- --test-threads=1
````
Test all
````shell
cargo test -- --test-threads=1
````
### Sqlite
Running the server
````shell
cargo run --features=sqlite --no-default-features
````
Running release
````shell
cargo run --features=sqlite --no-default-features --release
````
Integration tests. A path to the sqlite db is needed in as env
````shell
cargo test --features=sqlite --no-default-features --test '*' -- --test-threads=1
````
Unit tests
````shell
cargo test --lib --features=sqlite --no-default-features -- --test-threads=1
````
Test all
````shell
cargo test --features=sqlite --no-default-features -- --test-threads=1
````
## Dev
For dev, it is recommended to compile sqlite into a new target dir.
````shell
cargo run --features=sqlite --no-default-features --target-dir=target_sqlite
````