The repository is composed of three folders: rules-lib, rules-server and rules-client containing the code for the rules logic, server and web client respectively.
Note that the nightly toolchain of Rust is required to compile
rules-server.
In a terminal instance execute:
cd rules-server
cargo +nightly runIn a different terminal instance execute:
cd rules-client
yarn install
yarn startNavigate to http://localhost:3000/, you should see a page similar to the animation below. Change the values and test the responses.
Unit testing was implemented for rules-lib only and the tests are present in src/rules.rs. To execute them type or paste the following commands:
cd rules-lib
cargo test