-
Notifications
You must be signed in to change notification settings - Fork 75
docs: give every template a README.md #191
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
Open
joshua-mo-143
wants to merge
6
commits into
shuttle-hq:main
Choose a base branch
from
joshua-mo-143:update-readmes
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
fde7bf9
docs: give every template a README.md
joshua-mo-143 97348cc
feat: fix templates.toml
joshua-mo-143 cf09fdf
fix: typo
joshua-mo-143 b6cc267
docs: standardise readmes
joshua-mo-143 8e790ed
feat: standardize every last readme ever
joshua-mo-143 71bc067
fix: ci
joshua-mo-143 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,29 @@ | ||
| # Cookie authentication with actix-session | ||
| # Actix Web Cookie authentication with actix-session | ||
|
|
||
| ## Introduction | ||
|
|
||
| This template uses the [actix_identity](https://docs.rs/actix-identity) and [actix_session](https://docs.rs/actix-session) crates to manage user sessions. | ||
|
|
||
| Running the project and visiting <http://localhost:8000> will show the currently logged in user. | ||
| ## Features | ||
|
|
||
| - (basic) User-based session management | ||
| - Private/public routing | ||
|
|
||
| ## Pre-requisites | ||
|
|
||
| - Rust | ||
| - [cargo-shuttle](https://www.shuttle.dev) | ||
|
|
||
| ## How to use this template | ||
|
|
||
| Run the project with `shuttle run`. | ||
|
|
||
| Visiting <http://localhost:8000> will show the currently logged in user. | ||
| Visiting <http://localhost:8000/login> will log you in as `user1` (no authentication logic is in place). | ||
| Visiting <http://localhost:8000/logout> will log you out again. | ||
|
|
||
| Once you're ready to deploy, use `shuttle deploy`. | ||
|
|
||
| ## Troubleshooting | ||
| - Shuttle connects by default to port 8000 - if you're currently already using something at port 8000, you can add | ||
| the `--port <port-number>` to the `shuttle run` command to change this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| # Actix Web Hello World | ||
|
|
||
| ## Introduction | ||
|
|
||
| A `Hello world!` example for using Actix Web with Shuttle. | ||
|
|
||
| ## Features | ||
|
|
||
| - A route that returns `Hello, world!`. | ||
|
|
||
| ## Pre-requisites | ||
|
|
||
| - Rust | ||
| - [cargo-shuttle](https://www.shuttle.dev) | ||
|
|
||
| ## How to use this template | ||
|
|
||
| Run the project with `shuttle run`. | ||
|
|
||
| Visiting <http://localhost:8000> should output `Hello, world!`. | ||
|
|
||
| Once you're ready to deploy, use `shuttle deploy`. | ||
|
|
||
| ## Troubleshooting | ||
| - Shuttle connects by default to port 8000 - if you're currently already using something at port 8000, you can add | ||
| the `--port <port-number>` to the `shuttle run` command to change this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,31 @@ | ||
| # Actix Web static files | ||
| # Actix Web Static Files | ||
|
|
||
| ## Introduction | ||
|
|
||
| This template uses `actix_files` to serve the files in the `assets` directory. | ||
|
|
||
| ## Example usage | ||
| ## Features | ||
|
|
||
| - Plain HTML-based frontend | ||
|
|
||
| ## Pre-requisites | ||
|
|
||
| - Rust | ||
| - [cargo-shuttle](https://www.shuttle.dev) | ||
|
|
||
| ## How to use this template | ||
|
|
||
| Run the project with `shuttle run`. | ||
|
|
||
| Then run the following `curl` command below (or visit <http://localhost:8000/index.html>): | ||
|
|
||
| ```bash | ||
| curl localhost:8000/index.html | ||
| # <h1>Hello world!</h1> | ||
| ``` | ||
|
|
||
| Once you're ready to deploy, use `shuttle deploy`. | ||
|
|
||
| ## Troubleshooting | ||
| - Shuttle connects by default to port 8000 - if you're currently already using something at port 8000, you can add | ||
| the `--port <port-number>` to the `shuttle run` command to change this. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any reason for having this specific hint on every single README? The run command will use a different port if the attempted one is occupied, so this isn't really a problem to begin with. |
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,27 @@ | ||
| # Actix Web actorless websockets | ||
| # Actix Web Actorless Websockets | ||
|
|
||
| ## Introduction | ||
|
|
||
| This template shows how to use actorless websockets to build an API monitoring service and a simple chat app. | ||
|
|
||
| ## Example usage | ||
| ## Features | ||
|
|
||
| - A plain HTML-based frontend | ||
| - Websocket connection | ||
|
|
||
| ## Pre-requisites | ||
|
|
||
| - Rust | ||
| - [cargo-shuttle](https://www.shuttle.dev) | ||
|
|
||
| ## How to use this template | ||
|
|
||
| Run the project with `shuttle run`. | ||
|
|
||
| Then visit <http://localhost:8000/index.html> to try it out! | ||
|
|
||
| Once you're ready to deploy, use `shuttle deploy`. | ||
|
|
||
| Run the app and go to <http://localhost:8000>. | ||
| ## Troubleshooting | ||
| - Shuttle connects by default to port 8000 - if you're currently already using something at port 8000, you can add | ||
| the `--port <port-number>` to the `shuttle run` command to change this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| # Axum Hello World | ||
|
|
||
| ## Introduction | ||
|
|
||
| A `Hello world!` example for using Axum with Shuttle. | ||
|
|
||
| ## Features | ||
|
|
||
| - A route that returns `Hello, world!`. | ||
|
|
||
| ## Pre-requisites | ||
|
|
||
| - Rust | ||
| - [cargo-shuttle](https://www.shuttle.dev) | ||
|
|
||
| ## How to use this template | ||
|
|
||
| Run the project with `shuttle run`. | ||
|
|
||
| Visiting <http://localhost:8000> should output `Hello, world!`. | ||
|
|
||
| Once you're ready to deploy, use `shuttle deploy`. | ||
|
|
||
| ## Troubleshooting | ||
| - Shuttle connects by default to port 8000 - if you're currently already using something at port 8000, you can add | ||
| the `--port <port-number>` to the `shuttle run` command to change this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,30 @@ | ||
| # Axum + htmx | ||
| # Axum with HTMx | ||
|
|
||
| ## Introduction | ||
|
|
||
| This is an example of how you can use Shuttle with Axum, Askama and htmx to create a frontend that's easily extendable and requires zero framework knowledge, while being able to easily inject variables from the backend into the frontend. | ||
|
|
||
| The app is a TODO list with a main page and an event stream page. | ||
|
|
||
| ## Usage | ||
| ## Features | ||
|
|
||
| - A templating-based HTML frontend | ||
| - Routes for creating/viewing todos | ||
| - A route for viewing a real-time stream of todo list changes | ||
|
|
||
| ## Pre-requisites | ||
|
|
||
| - Rust | ||
| - [cargo-shuttle](https://www.shuttle.dev) | ||
|
|
||
| ## How to use this template | ||
|
|
||
| Run the project with `shuttle run`. | ||
|
|
||
| Run the app and go to <http://localhost:8000> to add and remove TODOs from the list. | ||
|
|
||
| Once you're ready to deploy, use `shuttle deploy`. | ||
|
|
||
| ## Troubleshooting | ||
| - Shuttle connects by default to port 8000 - if you're currently already using something at port 8000, you can add | ||
| the `--port <port-number>` to the `shuttle run` command to change this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,26 @@ | ||
| # JWT authentication in Axum | ||
| # Axum JWT authentication | ||
|
|
||
| ## Introduction | ||
|
|
||
| This template uses the `jsonwebtoken` crate to encode and decode claims in a JWT, which clients use in the Authorization HTTP header to access protected resources (endpoints). | ||
|
|
||
| ## Features | ||
|
|
||
| - JWT based authentication | ||
|
|
||
| ## Pre-requisites | ||
|
|
||
| - Rust | ||
| - [cargo-shuttle](https://www.shuttle.dev) | ||
|
|
||
| ## How to use this template | ||
|
|
||
| Run the project with `shuttle run`. | ||
|
|
||
| Visit <http://localhost:8000> to try it out. | ||
|
|
||
| Once you're ready to deploy, use `shuttle deploy`. | ||
|
|
||
| ## Troubleshooting | ||
| - Shuttle connects by default to port 8000 - if you're currently already using something at port 8000, you can add | ||
| the `--port <port-number>` to the `shuttle run` command to change this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| # Axum with Shuttle metadata | ||
|
|
||
| ## Introduction | ||
|
|
||
| An example that showcases Shuttle metadata at the base route using Axum. | ||
|
|
||
| ## Features | ||
|
|
||
| - View Shuttle metadata about your project at the base route | ||
|
|
||
| ## Pre-requisites | ||
|
|
||
| - Rust | ||
| - [cargo-shuttle](https://www.shuttle.dev) | ||
|
|
||
| ## How to use this template | ||
|
|
||
| Run the project with `shuttle run`. | ||
|
|
||
| Visit <http://localhost:8000> to try it out. | ||
|
|
||
| Once you're ready to deploy, use `shuttle deploy`. | ||
|
|
||
| ## Troubleshooting | ||
| - Shuttle connects by default to port 8000 - if you're currently already using something at port 8000, you can add | ||
| the `--port <port-number>` to the `shuttle run` command to change this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,36 @@ | ||
| # Google OAuth in Axum | ||
| # Axum with Google OAuth | ||
|
|
||
| ## Introduction | ||
|
|
||
| This template is an example of how you can implement Google OAuth using the Axum web framework in Rust. | ||
|
|
||
| ## Prerequisites | ||
| ## Features | ||
|
|
||
| - Google-based Oauth2 authentication | ||
|
|
||
| ## Pre-requisites | ||
|
|
||
| - Rust | ||
| - Google account | ||
| - [cargo-shuttle](https://www.shuttle.dev) | ||
|
|
||
| ## How to use this template | ||
|
|
||
| Make sure you set up your Google OAuth, which you can find a link to set up [here.](https://console.cloud.google.com/apis/dashboard) | ||
|
|
||
| Set your secrets in the Secrets.toml file: | ||
| Set your secrets in a `Secrets.toml` file: | ||
|
|
||
| ```toml | ||
| GOOGLE_OAUTH_CLIENT_ID = "your-client-id" | ||
| GOOGLE_OAUTH_CLIENT_SECRET = "your-client-secret" | ||
| ``` | ||
|
|
||
| Use `shuttle run` and visit `http://localhost:8000` once the app is running, then try it out! | ||
| Run the project with `shuttle run`. | ||
|
|
||
| Visit `http://localhost:8000` once the app is running, then try it out! | ||
|
|
||
| Once you're ready to deploy, use `shuttle deploy`. | ||
|
|
||
| ## Troubleshooting | ||
| - Shuttle connects by default to port 8000 - if you're currently already using something at port 8000, you can add | ||
| the `--port <port-number>` to the `shuttle run` command to change this. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this link instead say "Shuttle CLI", and the link be to the installation docs? (all READMEs)