Skip to content

LuYanFCP/oauth2_example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Leptos

This template demonstrates the use of the Leptos framework on Workers, including support for server side rendering and server functions.

Frontend assets are built using cargo leptos by compiling the crate with the hydrate feature. The backend module uses workers-rs and is built by compiling the crate using worker-build with the ssr feature. This is done automatically when using wrangler with the custom build command specified in wrangler.toml.

Frontend assets are served using Workers Assets. Any request which matches an asset path will be served directly and not invoke the Worker. Requests which do not match an asset path will invoke the Worker. This includes requests to index.html (which will be server-side rendered) and any server function (API) routes.

Setup

Cargo Leptos is required to build the project.

cargo install --locked cargo-leptos

Run Locally

npx wrangler dev

Deploy

npx wrangler deploy

About

A Simple Case Learn Oauth2 in Cloudflare worker using Rust

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages