Install the following dependencies:
- Rust to run the application on the server
- Install the Dioxus tooling
- Install the dioxus-cli
https://github.com/DioxusLabs/dioxus/tree/master/packages/cli
cargo install [email protected]
- Install the
wasm32-unknown-unknown
target for Rust
rustup target add wasm32-unknown-unknown
- Create the demo-dashboard crate
Note: you may have to search to find the directory you want to cd
into.
cargo new --bin demo-dashboard
cd demo-dashboard
- Run this command to add the web renderer dependencies to the
Cargo.toml
file
cargo add [email protected] --features fullstack
Using the Dioxus Config file and the Dioxus CLI you can create a Dioxus.toml
file in the root of your project. This file will contain the configuration for the Dioxus CLI.
[application]
name = "project-name"
# Currently supported platforms: web, desktop
default_platform = "web"
[web.app]
title = "Hello"
[web.watcher]
[web.resource.dev]
- Run the application on the server
dx serve --platform fullstack
- Build the Docker image
docker build -t demo-dashboard .
- Run and test the Docker image
docker run -p 8080:8080 demo-dashboard
- Uploading the Docker image to the Docker Hub
docker tag uhstray/demo-dashboard:latest uhstray/demo-dashboard:latest
docker push uhstray/demo-dashboard:latest
- Pulling the Docker image from the Docker Hub
docker pull uhstray/demo-dashboard:latest
dx fmt