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/armhf -t mydrive-raspberrypi-cross --load .
- Run cross compilation
RUSTFLAGS='-L /usr/arm-linux-gnueabihf/lib/ -L /usr/lib/arm-linux-gnueabihf/' cross build --release --target=armv7-unknown-linux-gnueabihf
- Copy the
target/armv7-unknown-linux-gnueabihf/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.