Skip to content

Latest commit

 

History

History
64 lines (42 loc) · 1.85 KB

CONTRIBUTING.md

File metadata and controls

64 lines (42 loc) · 1.85 KB

Contributing

Developing

Dependencies

Setting up

  • Clone the repository:

    git clone https://github.com/metabrainz/mb-mail-service.git
    cd mb-mail-service
  • Install pre-commit hooks:

    pre-commit install

Running

cargo run

To send mail to your local SMTP relay, first start it, and then tell the service which port it is running on with an environment variable:

SMTP_PORT="1025" cargo run

Automatic restarts (live reload)

  • Install systemfd
  • Install cargo-watch
  • Run systemfd --no-pid -s http::3000 -- cargo watch -x run

Controlling logging

Logs are controlled through the RUST_LOG environment variable using Tracing's Directives syntax.

For example:

APP_SMTP_PORT="1025" RUST_LOG="trace,html5ever=warn,lettre::transport::smtp::client::async_connection=warn,runtime=warn,tokio::task=warn" systemfd --no-pid -s http::3000 -- cargo watch -x run

Testing

cargo test

Committing

Commits in this repository follow Conventional Commits on a best-effort basis. This is automatically enforced by pre-commit hooks. For examples, please look at the commit history of the repository.