leptos/examples
2024-03-13 22:33:54 -04:00
..
action-form-error-handling clean up examples 2024-01-19 15:14:39 -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(ci) Wait a bit longer for server to start 2024-03-01 15:47:59 -06:00
counter fix(ci): address clippy issue (#2278) 2024-02-09 16:30:11 -05:00
counter_isomorphic fix(ci): leptos examples fail with bindgen schema error (#2428) 2024-03-13 22:33:54 -04:00
counter_url_query fix(ci): address clippy issue (#2278) 2024-02-09 16:30:11 -05:00
counter_without_macros fix(ci): leptos examples fail with bindgen schema error (#2428) 2024-03-13 22:33:54 -04:00
counters fix(ci): address clippy issue (#2278) 2024-02-09 16:30:11 -05:00
counters_stable fix(ci): leptos examples fail with bindgen schema error (#2428) 2024-03-13 22:33:54 -04:00
directives fix(ci): address clippy issue (#2278) 2024-02-09 16:30:11 -05:00
error_boundary fix(ci): Another attempt to fix hanging example 2024-03-01 15:41:22 -06:00
errors_axum fix(ci): address clippy issue (#2278) 2024-02-09 16:30:11 -05:00
fetch fix(ci): address clippy issue (#2278) 2024-02-09 16:30:11 -05:00
gtk ci(examples): build hackernews_js_fetch with deno (#2344) 2024-02-23 13:40:44 -05:00
hackernews fix(ci): address clippy issue (#2278) 2024-02-09 16:30:11 -05:00
hackernews_axum fix(ci): address clippy issue (#2278) 2024-02-09 16:30:11 -05:00
hackernews_islands_axum ci(hackernews_islands_axum): build with cargo leptos 2024-02-11 15:40:32 -05:00
hackernews_js_fetch ci(examples): build hackernews_js_fetch with deno (#2344) 2024-02-23 13:40:44 -05:00
js-framework-benchmark fix(ci): address clippy issue (#2278) 2024-02-09 16:30:11 -05:00
login_with_token_csr_only Update login example (CSR only) (#2155) 2024-01-19 14:16:58 -05:00
parent_child fix(ci): address clippy issue (#2278) 2024-02-09 16:30:11 -05:00
portal fix(ci): address clippy issue (#2278) 2024-02-09 16:30:11 -05:00
router fix(ci): address clippy issue (#2278) 2024-02-09 16:30:11 -05:00
server_fns_axum fix(ci): address clippy issue (#2278) 2024-02-09 16:30:11 -05:00
session_auth_axum example: replace yanked version of session_auth_axum crate (#2310) 2024-02-15 20:16:26 -05:00
slots fix(ci): address clippy issue (#2278) 2024-02-09 16:30:11 -05:00
sso_auth_axum examples: fix typos in examples (#2260) 2024-02-05 05:20:53 -05:00
ssr_modes feat: add support for trailing slashes (closes #2154) (#2217) 2024-02-26 20:56:44 -05:00
ssr_modes_axum feat: add support for trailing slashes (closes #2154) (#2217) 2024-02-26 20:56:44 -05:00
suspense_tests fix(ci): leptos examples fail with bindgen schema error (#2428) 2024-03-13 22:33:54 -04:00
tailwind_actix fix(ci): address clippy issue (#2278) 2024-02-09 16:30:11 -05:00
tailwind_axum examples: fix CSS file name in tailwind_axum (#2324) 2024-02-17 12:56:03 -05:00
tailwind_csr example: fix href path in tailwind_csr example (#2328) 2024-02-17 13:10:07 -05:00
timer fix(ci): address clippy issue (#2278) 2024-02-09 16:30:11 -05:00
todo_app_sqlite fix(ci): address clippy issue (#2278) 2024-02-09 16:30:11 -05:00
todo_app_sqlite_axum fix(ci): address clippy issue (#2278) 2024-02-09 16:30:11 -05:00
todo_app_sqlite_csr fix(ci): address clippy issue (#2278) 2024-02-09 16:30:11 -05:00
todomvc examples/todomvc - Rename Todos::new() Todos::default(). (#2390) 2024-03-03 13:48:40 -08:00
Makefile.toml docs(test-report): mention options 2024-02-11 15:40:32 -05:00
README.md docs(examples): update docs (#2313) 2024-02-16 13:32:01 -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 you want to run
  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)