leptos/examples
2024-01-19 14:16:17 -05:00
..
animated_show docs: make it easy to see how to run each example in its README (#2085) 2023-11-28 11:47:56 -05:00
cargo-make fix(examples/error_boundary): ci error (#1739) 2023-09-17 20:38:03 -04:00
counter chore: add rust-toolchain.toml to examples (closes #2151) (#2161) 2024-01-07 15:29:54 -05:00
counter_isomorphic feat: add support for placing attributes on server functions (#2093) 2023-12-01 15:36:52 -05:00
counter_url_query chore: add rust-toolchain.toml to examples (closes #2151) (#2161) 2024-01-07 15:29:54 -05:00
counter_without_macros docs: make it easy to see how to run each example in its README (#2085) 2023-11-28 11:47:56 -05:00
counters chore: add rust-toolchain.toml to examples (closes #2151) (#2161) 2024-01-07 15:29:54 -05:00
counters_stable docs: make it easy to see how to run each example in its README (#2085) 2023-11-28 11:47:56 -05:00
directives chore: add rust-toolchain.toml to examples (closes #2151) (#2161) 2024-01-07 15:29:54 -05:00
error_boundary chore: add rust-toolchain.toml to examples (closes #2151) (#2161) 2024-01-07 15:29:54 -05:00
errors_axum Update integration with support for axum 0.7 (#2082) 2024-01-19 14:13:55 -05:00
fetch chore: add rust-toolchain.toml to examples (closes #2151) (#2161) 2024-01-07 15:29:54 -05:00
gtk v0.5.1 2023-10-06 09:40:23 -04:00
hackernews chore: add rust-toolchain.toml to examples (closes #2151) (#2161) 2024-01-07 15:29:54 -05:00
hackernews_axum Update integration with support for axum 0.7 (#2082) 2024-01-19 14:13:55 -05:00
hackernews_islands_axum Update integration with support for axum 0.7 (#2082) 2024-01-19 14:13:55 -05:00
hackernews_js_fetch Update integration with support for axum 0.7 (#2082) 2024-01-19 14:13:55 -05:00
js-framework-benchmark chore: add rust-toolchain.toml to examples (closes #2151) (#2161) 2024-01-07 15:29:54 -05:00
login_with_token_csr_only does this make clippy happy in CI? (#1965) 2023-10-29 21:48:33 -04:00
parent_child chore: add rust-toolchain.toml to examples (closes #2151) (#2161) 2024-01-07 15:29:54 -05:00
pavex_demo Made some progress, started work on pavex integration as well 2024-01-19 14:16:03 -05:00
portal docs: make it easy to see how to run each example in its README (#2085) 2023-11-28 11:47:56 -05:00
router ci: add regression test for matching main page correctly in router example 2024-01-19 10:26:58 -05:00
session_auth_axum First commit, checkpoint for cyclical dependency error 2024-01-19 14:15:51 -05:00
slots chore: add rust-toolchain.toml to examples (closes #2151) (#2161) 2024-01-07 15:29:54 -05:00
sso_auth_axum examples: update axum-session because old version was yanked (#2205) 2024-01-19 12:54:08 -05:00
ssr_modes Revert "Better handling for trailing slashes. (#2154) (#2172)" 2024-01-19 10:27:38 -05:00
ssr_modes_axum Update integration with support for axum 0.7 (#2082) 2024-01-19 14:13:55 -05:00
suspense_tests docs: make it easy to see how to run each example in its README (#2085) 2023-11-28 11:47:56 -05:00
tailwind_actix chore: remove dead code in actix tailwind example (#2160) 2024-01-07 15:29:15 -05:00
tailwind_axum Update integration with support for axum 0.7 (#2082) 2024-01-19 14:13:55 -05:00
tailwind_csr chore: add rust-toolchain.toml to examples (closes #2151) (#2161) 2024-01-07 15:29:54 -05:00
timer docs: make it easy to see how to run each example in its README (#2085) 2023-11-28 11:47:56 -05:00
todo_app_sqlite start Actix work 2024-01-19 14:16:17 -05:00
todo_app_sqlite_axum automatically include server function handler in .leptos_router() 2024-01-19 14:16:17 -05:00
todo_app_sqlite_csr Update integration with support for axum 0.7 (#2082) 2024-01-19 14:13:55 -05:00
todo_app_sqlite_viz chore: add rust-toolchain.toml to examples (closes #2151) (#2161) 2024-01-07 15:29:54 -05:00
todomvc chore: add rust-toolchain.toml to examples (closes #2151) (#2161) 2024-01-07 15:29:54 -05:00
Makefile.toml examples: rename Tailwind examples (#1875) 2023-10-13 16:20:26 -04:00
README.md chore: clarify cargo-make and examples (see #2141) (#2150) 2023-12-30 08:14:23 -05:00
SSR_NOTES.md doc(examples): reference run instructions (#1705) 2023-09-13 19:57:50 -04:00

Examples README

Main Branch

The examples in this directory are all built and tested against the current main branch.

To the extent that new features have been released or breaking changes have been made since the previous release, the examples are compatible with the main branch and not the current release.

Getting Started

The simplest way to get started with any example is to use the “quick start” command found in the README for each example. Most of the examples use either trunk (a simple build system and dev server for client-side-rendered apps) or cargo-leptos (a build system for server-rendered and client-hydrated apps).

Using Cargo Make

You can also run any of the examples using cargo-make. Note that this is completely optional. We use it for CI, and it can be convenient for running the examples, but is not required.

Follow these steps to get any example up and running.

  1. cd to the example root directory
  2. Run cargo make ci to setup and test the example
  3. Run cargo make start to run the example
  4. Open the client URL in the console output (http://127.0.0.1:8080 or http://127.0.0.1:3000 by default)
  5. Run cargo make stop to end any processes started by cargo make start.

Here are a few additional notes:

  • Extendable custom task files are located in the cargo-make directory
  • Running a task will automatically install cargo dependencies
  • Each Makefile.toml file must extend the cargo-make/main.toml file
  • cargo-make files that end in *-test.toml configure web testing strategies
  • Run cargo make test-report to learn which examples have web tests

Prerequisites

Example projects depend on the following tools. Please install them as needed.

  • Rust
  • Nightly Rust
    • Run rustup toolchain install nightly
    • Run rustup target add wasm32-unknown-unknown
  • Cargo Make
    • Run cargo install --force cargo-make
    • Setup a command alias like alias cm='cargo make' to reduce typing (Optional)
  • Trunk
    • Run cargo install trunk
  • Node Version Manager (Optional)
  • Node.js
  • pnpm (Optional)