Attempt to make a simple clone of Google Drive.
The main goal was to try HTMX with Rust backend.
- HTMX
- Bootstrap CSS
- JavaScript (event handling)
- Rust
- Actix-Web
- Handlebars (template rendering)
cross
installed- Docker daemon running
- Build custom docker image for
cross
tool to use by callingdocker buildx build --platform linux/arm64 -t mydrive-raspberrypi-cross --load .
- Run cross compilation
RUSTFLAGS='-L /usr/aarch64-linux-gnu/lib/ -L /usr/lib/aarch64-linux-gnu/' cross build --release --target=aarch64-unknown-linux-gnu
- Copy the
target/aarch64-unknown-linux-gnu/release/my-drive
to directory on Raspberry Pi. - Copy
static
directory to the same directory on Raspberry Pi. - Copy
templates
directory to the same directory on Raspberry Pi. - Create
.env
file in target directory on Raspberry Pi and putBASE_DIR=[path to base drive directory]
in (e.g.echo "BASE_DIR=[path to base drive directory]" > .env
).
- Build app with "ngrok" feature enabled.
- Create
ngrok-config.toml
configuration from template and put it next to executable file.