Written in Rust with support of Leptos web framework and the cargo-leptos tool.
By default, cargo-leptos
uses nightly
Rust, cargo-generate
, and sass
. If you run into any trouble, you may need to install one or more of these tools.
rustup toolchain install nightly --allow-downgrade
- make sure you have Rust nightlyrustup target add wasm32-unknown-unknown
- add the ability to compile Rust to WebAssemblycargo install cargo-generate
- installcargo-generate
binary (should be installed automatically in future)npm install -g sass
- installdart-sass
(should be optional in future)- If you don't have
cargo-leptos
installed you can install it with -$ cargo install cargo-leptos
Install dev dependencies:yarn install --frozen-lockfile
Install cargo dependencies:cargo build
Then, to run project
Compiler check: yarn test
Launch web:yarn web
Launch tailwind: yarn style
You can access your local project at http://localhost:9121
Set the following environment variables (updating for your project as needed):
export DEVLOGS_SURREAL_DB_SOCKET_ADDRESS="127.0.0.1:8181"
export DEVLOGS_SURREAL_DB_NAME="devlog"
export DEVLOGS_SURREAL_DB_NAMESPACE="test"
export DEVLOGS_SURREAL_DB_USERNAME="root"
export DEVLOGS_SURREAL_DB_PASSWORD="root"
export LEPTOS_OUTPUT_NAME="leptos_start"
export LEPTOS_SITE_ROOT="site"
export LEPTOS_SITE_PKG_DIR="pkg"
export LEPTOS_SITE_ADDR="127.0.0.1:3000"
export LEPTOS_RELOAD_PORT="3001"