cargo install cargo-leptos sqlx-cli
npm install -D tailwindcss prettier prettier-plugin-tailwindcss @tailwindcss/typography daisyui@latest
Run and prepare the database
docker-compose up db -d
sqlx migrate run
Compile tailwindcss and watch for changes
npx tailwindcss -i ./input.css -o ./style/tailwind.css --watch
Run the server and watch for changes
DATABASE_URL=postgres://postgres:tits@localhost:5432/mydadrocks cargo leptos watch
cargo sqlx prepare
docker-compose build
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
cargo install leptosfmt
leptosfmt .