mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-10 06:44:17 +00:00
c53fc67d38
* Add task for cargo leptos w/ precompression * Update makefile * Update deps * Serve precompressed assets Code was taken from https://github.com/leptos-rs/cargo-leptos/pull/165#issuecomment-1647843037 Co-authored-by: Sebastian Dobe <sebastiandobe@mailbox.org> * Dynamically compress html * Update README * Refactor: Format for ci * Refactor: Replace use of format! * Chore: Remove old build file * Feat: Hash files This will prevent users from using an old cached file after updates are made * Fix: Prevent chicken & egg problem with target/site * Refactor: Use normal cargo-leptos --------- Co-authored-by: Sebastian Dobe <sebastiandobe@mailbox.org>
651 B
651 B
Leptos Hacker News Example with Axum
This example creates a basic clone of the Hacker News site. It showcases Leptos' ability to:
- Create a client-side rendered app
- Create a server side rendered app with hydration
- Precompress static assets and bundle those in with the server binary
This repo differs from the main Hacker News example by using Axum as it's server, precompressing and embedding static assets into the binary, and dynamically compressing the generated HTML.
Getting Started
See the Examples README for setup and run instructions.
Quick Start
Run cargo leptos watch --release -P
to run this example.