Stateful Rust web service that enables the efficient concurrent compilation and distribution of statistics regarding Apertium packages via a RESTful API.
See api.html for the Swagger UI representation of the OpenAPI 3.0 spec.
Build with cargo build and run with cargo run.
Edit .env to set environment parameters including those that control
Rocket configuration.
Use cargo build --release to create production binaries or use the
provided Dockerfile:
docker build -t apertium-stats-service .
docker run -t -p 8000:8000 apertium-stats-service # or 80 for staging/prod
To persist data across restarts, use docker-compose.yml instead:
docker-compose up --build
Install the Rust toolchain via rustup.
Setup a SQLite database with diesel database setup.
Run cargo fmt to format code, cargo clippy to check for lint and
cargo test to run tests.