- WASM target:
rustup target add wasm32-unknown-unknown cargo install cargo-leptos
cargo leptos serve --releaseThe server listens on [::1]:3000 (IPv6 loopback only) by default, configurable via site-addr in Cargo.toml or the LEPTOS_SITE_ADDR environment variable.
cargo leptos build --releaseProduces the server binary in target/release and the site assets in target/site.
After cargo leptos build --release, copy the server binary and the target/site directory to the target host, then set:
export LEPTOS_OUTPUT_NAME="webpages"
export LEPTOS_SITE_ROOT="site"
export LEPTOS_SITE_PKG_DIR="pkg"
export LEPTOS_SITE_ADDR="[::1]:3000"
export LEPTOS_RELOAD_PORT="3001"and run the binary.
Licensed under the Apache License, Version 2.0.