API
Note
For the API development, you need to install the Rust compiler.
Check the dedicated documentation section for more information.
You can compile without running with:
Then you can run ./target/debug/panoramax-api --db-url=postgres://username:password@localhost:5432/panoramax
.
If you also want to quickly know if the compilation is ok you can do
For development purpose, you might want hot reload to run build on file changes. To do this, install cargo-watch:
then
RUST_LOG=info PORT=9001 DB_URL=postgres://username:password@localhost:5432/panoramax cargo watch -x run
Matomo
Usage statistics can be sent to a configured matomo instance by providing it's url/site-id when running the API.
The environment variables for this are:
MATOMO_URL
MATOMO_SITE_ID
Tests
To run the tests:
Format
All files should be formated with rustfmt: