{"id":13597293,"url":"https://github.com/leptos-rs/start-axum-workspace","last_synced_at":"2025-06-15T04:41:28.944Z","repository":{"id":261719023,"uuid":"885130238","full_name":"leptos-rs/start-axum-workspace","owner":"leptos-rs","description":"Starter for Leptos in a workspace for 0.7","archived":false,"fork":false,"pushed_at":"2025-02-19T19:15:17.000Z","size":117,"stargazers_count":7,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-13T00:35:48.106Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leptos-rs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-08T02:27:22.000Z","updated_at":"2025-04-12T09:01:47.000Z","dependencies_parsed_at":"2024-11-08T03:29:01.933Z","dependency_job_id":"01fb8bb7-4c70-4d11-8b95-831eb9a55a4b","html_url":"https://github.com/leptos-rs/start-axum-workspace","commit_stats":null,"previous_names":["leptos-rs/start-axum-workspace-0.7"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leptos-rs%2Fstart-axum-workspace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leptos-rs%2Fstart-axum-workspace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leptos-rs%2Fstart-axum-workspace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leptos-rs%2Fstart-axum-workspace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leptos-rs","download_url":"https://codeload.github.com/leptos-rs/start-axum-workspace/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248650426,"owners_count":21139671,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T17:00:29.725Z","updated_at":"2025-04-13T00:35:58.833Z","avatar_url":"https://github.com/leptos-rs.png","language":"Rust","funding_links":[],"categories":["Starter Templates"],"sub_categories":["Official"],"readme":"\u003cpicture\u003e\n    \u003csource srcset=\"https://raw.githubusercontent.com/leptos-rs/leptos/main/docs/logos/Leptos_logo_Solid_White.svg\" media=\"(prefers-color-scheme: dark)\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/leptos-rs/leptos/main/docs/logos/Leptos_logo_RGB.svg\" alt=\"Leptos Logo\"\u003e\n\u003c/picture\u003e\n\n# Leptos Axum Starter Template\n\nThis is a template for use with the [Leptos](https://github.com/leptos-rs/leptos) web framework and the [cargo-leptos](https://github.com/leptos-rs/cargo-leptos) tool using [Axum](https://github.com/tokio-rs/axum).\n\n## Creating your template repo\n\nIf you don't have `cargo-leptos` installed you can install it with\n\n```bash\ncargo install cargo-leptos --locked\n```\n\nThen run\n```bash\ncargo leptos new --git https://github.com/leptos-rs/start-axum-workspace/\n```\n\nto generate a new project template.\n\n```bash\ncd {projectname}\n```\n\nto go to your newly created project.  \nFeel free to explore the project structure, but the best place to start with your application code is in `src/app.rs`.  \nAdditionally, Cargo.toml may need updating as new versions of the dependencies are released, especially if things are not working after a `cargo update`.\n\n### Islands support\n\nNote that for islands to work correctly, you need to have a `use app;` in your frontend `lib.rs` otherwise rustc / wasm_bindgen gets confused.\nTo prevent clippy from complaining, at the top of the `frontend/lib.rs` file place:\n```rust\n#[allow(clippy::single_component_path_imports)]\n#[allow(unused_imports)]\nuse app;\n```\n\n## Running your project\n\n```bash\ncargo leptos watch\n```\n\n## Installing Additional Tools\n\nBy 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.\n\n1. `rustup toolchain install nightly --allow-downgrade` - make sure you have Rust nightly\n2. `rustup default nightly` - setup nightly as default, or you can use rust-toolchain file later on\n3. `rustup target add wasm32-unknown-unknown` - add the ability to compile Rust to WebAssembly\n4. `cargo install cargo-generate` - install `cargo-generate` binary (should be installed automatically in future)\n5. `npm install -g sass` - install `dart-sass` (should be optional in future\n\n## Compiling for Release\n```bash\ncargo leptos build --release\n```\n\nWill generate your server binary in target/server/release and your site package in target/site\n\n## Testing Your Project\n\nCargo-leptos uses (https://playwright.dev)[Playwright] as the end-to-end test tool. \n\nPrior to the first run of the end-to-end tests run Playwright must be installed. \nIn the project's `end2end` directory run `npm install -D playwright @playwright/test` to install playwright and browser specific APIs.\n\nTo run the tests during development in the project root run:\n```bash\ncargo leptos end-to-end\n```\n\nTo run tests for release in the project root run:\n```bash\ncargo leptos end-to-end --release\n```\nThere are some examples tests are located in `end2end/tests` directory that pass tests with the sample Leptos app.\n\nA web-based report on tests is available by running `npx playwright show-report` in the `end2end` directory.\n\n\n## Executing a Server on a Remote Machine Without the Toolchain\nAfter running a `cargo leptos build --release` the minimum files needed are:\n\n1. The server binary located in `target/server/release`\n2. The `site` directory and all files within located in `target/site`\n\nCopy these files to your remote server. The directory structure should be:\n```text\nstart-axum-workspace\nsite/\n```\nSet the following environment variables (updating for your project as needed):\n```text\nLEPTOS_OUTPUT_NAME=\"start-axum-workspace\"\nLEPTOS_SITE_ROOT=\"site\"\nLEPTOS_SITE_PKG_DIR=\"pkg\"\nLEPTOS_SITE_ADDR=\"127.0.0.1:3000\"\nLEPTOS_RELOAD_PORT=\"3001\"\n```\nFinally, run the server binary.\n\n## Licensing\n\nThis template itself is released under the Unlicense. You should replace the LICENSE for your own application with an appropriate license if you plan to release it publicly.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleptos-rs%2Fstart-axum-workspace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleptos-rs%2Fstart-axum-workspace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleptos-rs%2Fstart-axum-workspace/lists"}