Documentation Index
Fetch the complete documentation index at: https://docs.shuttle.dev/llms.txt
Use this file to discover all available pages before exploring further.
This section revolves around simple Actix examples you can get quickly started with by following these 3 steps:
- Initialize a new Actix project by running the
shuttle init --template actix-web command
- Copy pasting the contents of the example you want to deploy — make sure to check the tabs of the snippet(s) to ensure you are copying the right code/file
- Running the
shuttle deploy command
If you are looking for step-by-step guides, check out our
Tutorials section.
You can clone the example below by running the following (you’ll need shuttle CLI installed):
shuttle init --template actix-web
use actix_web::{get, web::ServiceConfig};
use shuttle_actix_web::ShuttleActixWeb;
#[get("/")]
async fn hello_world() -> &'static str {
"Hello World!"
}
#[shuttle_runtime::main]
async fn actix_web(
) -> ShuttleActixWeb<impl FnOnce(&mut ServiceConfig) + Send + Clone + 'static> {
let config = move |cfg: &mut ServiceConfig| {
cfg.service(hello_world);
};
Ok(config.into())
}
If you want to explore other frameworks, we have more examples with popular ones like Tower and Warp. You can find them
right here.