Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Deployment" Chapter - add starter templates for deploying to Deno & Cloudflare #5

Open
diversable opened this issue Nov 28, 2023 · 1 comment

Comments

@diversable
Copy link
Contributor

diversable commented Nov 28, 2023

In the long term, starter templates should be added to cargo-leptos to make the 'getting started' experience as smooth as possible. In the meantime, there have been questions from users in Discord about how to deploy Leptos websites/apps to multiple platforms.

So, as a follow-up to leptos-rs/leptos#2032:
We should refactor the "Deployment" chapter to separate CSR app deployment from SSR app deployment.

In the CSR deployment chapter, add:

https://github.com/diversable/leptos-spin-CSR

In the SSR deployment chapter, add a template for AWS Lambda: see below

Deploying to WinterCG-enabled environments (Deno Deploy, Cloudflare,etc):
see https://github.com/leptos-rs/leptos/releases/tag/v0.5.0

Also, look into creating templates for:

  • Deno Deploy
  • Cloudflare
  • Spin SSR (*if the req'd PR gets merged to enable this setup)

cf. 'gbj' comment on Discord:
"""
It would be great to also have Deno Deploy, Cloudflare, Spin starters. The easier we make it for people the better
"""

@CorvusPrudens
Copy link

CorvusPrudens commented Dec 3, 2023

Here's a template repo for deployment to AWS Lambda. It's based on the axum starter template, as it is overall very similar. It includes a GitHub action that handles the deployment automatically (as long as the user has provided sufficient AWS credentials as repository secrets).

If there are any ways it can be improved, please let me know! The build steps in particular may not be ideal. I've suggested a change to cargo-leptos that would remove the need for compiling the server binary twice using the build steps in this template, but it may very well be the case that this can be avoided properly in userland.

@diversable diversable changed the title "Deployment" Chapter - add starter templates for deploying to AWS Lambda and Fermyon Spin (CSR), etc. "Deployment" Chapter - add starter templates for deploying to Deno & Cloudflare Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants