mirror of
https://github.com/actix/actix-website
synced 2025-06-27 07:29:02 +02:00
review server section
This commit is contained in:
@ -1,12 +1,12 @@
|
||||
// <setup>
|
||||
use actix_web::{web, App, Responder};
|
||||
use actix_web::{web, App, Responder, HttpServer};
|
||||
|
||||
async fn index() -> impl Responder {
|
||||
"Hello world!"
|
||||
}
|
||||
|
||||
#[actix_rt::main]
|
||||
async fn main() {
|
||||
async fn main() -> std::io::Result<()> {
|
||||
HttpServer::new(|| {
|
||||
App::new().service(
|
||||
web::scope("/app").route("/index.html", web::get().to(index)),
|
||||
|
@ -1,4 +1,4 @@
|
||||
use actix_web::{web, App, HttpResponse};
|
||||
use actix_web::{web, App, HttpResponse, HttpServer};
|
||||
|
||||
pub mod app;
|
||||
pub mod combine;
|
||||
@ -10,7 +10,7 @@ pub mod vh;
|
||||
|
||||
// <multi>
|
||||
#[actix_rt::main]
|
||||
async fn main() {
|
||||
async fn main() -> std::io::Result<()> {
|
||||
HttpServer::new(|| {
|
||||
App::new()
|
||||
.service(
|
||||
|
Reference in New Issue
Block a user