A little cooking recipes website
| .cargo | ||
| backend | ||
| common | ||
| doc | ||
| frontend | ||
| stress_tests | ||
| .gitattributes | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| do.nu | ||
| README.md | ||
Recipes is a multi-user website to manage and publish cooking recipes.
Prerequisites
- Rust: https://www.rust-lang.org/
- Trunk: https://trunkrs.dev/
- Nushell: https://www.nushell.sh/ (nu needs to be in PATH)
- Sass: https://sass-lang.com/ (sass or sass.bat needs to be in PATH)
Run in debug mode
$> nu do.nu run
Then browse http://127.0.0.1:8082
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
How-to
How to install service on a Linux server (with systemd)
As root:
- Copy
doc/recipes.serviceto/lib/systemd/system/ - Change the values of
User,WorkingDirectoryandExecStart. - 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/
- HTML Validation Service: https://validator.w3.org/
- Site analysis: https://pagespeed.web.dev/
- Open-Source UI: https://uiverse.io/
Useful tools
- HTTP benchmarking and stress tool: https://crates.io/crates/oha
- HTTP API tool: https://www.usebruno.com/
- GUI Database client: https://dbeaver.io/