To run the project first of all you need to have cargo-leptos installed on your machine
cargo install --locked cargo-leptos
Then run
npm run watch (This is a script which basically run the CLI tool to scan your template files for classes and build your CSS.)
and
cargo leptos watch
in this directory.
Open browser on http://localhost:3000/
You can begin editing your app at src/app.rs.
You can install Tailwind using npm:
npm install -D tailwindcssAlso Tailwind Typography and Preline
If you're using VS Code, add the following to your settings.json
  "emmet.includeLanguages": {
    "rust": "html",
    "*.rs": "html"
  },
  "tailwindCSS.includeLanguages": {
      "rust": "html",
      "*.rs": "html"
  },
  "files.associations": {
      "*.rs": "rust"
  },
  "editor.quickSuggestions": {
    "other": "on",
    "comments": "on",
    "strings": true
  },
  "css.validate": false,Install Tailwind CSS Intellisense.
Install "VS Browser" extension, a browser at the right window.
Allow vscode Ports forward: 3000, 3001.
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 nightly
- rustup default nightly- setup nightly as default, or you can use rust-toolchain file later on
- rustup target add wasm32-unknown-unknown- add the ability to compile Rust to WebAssembly
- cargo install cargo-generate- install- cargo-generatebinary (should be installed automatically in future)
- npm install -g sass- install- dart-sass(should be optional in future)
cargo leptos build --releaseWill generate your server binary in target/release and your site package in target/site.
docker build ./ -t itehax-websiteAfter it's builded.
docker run -p 3000:3000 itehax-website