| .cargo | ||
| backend | ||
| common | ||
| doc | ||
| frontend | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| check_cargo_dependencies_upgrade.nu | ||
| deploy.nu | ||
| README.md | ||
| TODO.md | ||
Technical
Backend
Launch Axum
In directory '/backend' type: $> cargo run
Then browse http://127.0.0.1:8082 (You need to compile the wasm file first, see section 'Frontend')
At first launch the configuration file '/backend/conf.ron' is created. It contains the port the server will listen to and information about the SMTP server which will be used to send email when a user sign up or change its password.
Autoreload
First install cargo watch: $> cargo install cargo-watch
In directory '/backend' type: $> cargo watch -x run
Frontend
Tools needed
nushell: https://www.nushell.sh/ wasm-pack: https://github.com/rustwasm/wasm-pack wasm-opt: $> cargo install wasm-opt
Compilation
In directory '/frontend' type: $> nu deploy.nu
It will create the '/frontend/pkg' directory and copy the wasm file into '/backend/static'. You can now refresh your browser to reload the wasm file.
How-to
How to install service on a Linux server
As root:
- Copy '/doc/recipes.service' to '/lib/systemd/system/'
- Enabled it: #> systemctl enable recipes
- Launch it: #> systemctl start recipes
Cross compile for Raspberry PI on Windows
Useful URLs
- Rust patterns : https://github.com/rust-unofficial/patterns
- Rust cheat Sheet: https://cheats.rs/
Useful tools
Benchmarking: https://crates.io/crates/oha HTTP API tool: https://www.usebruno.com/ GUI Database client: https://dbeaver.io/