1
0
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:
Nikolay Kim
2020-01-02 12:56:32 +06:00
parent e71c712d16
commit e30c20016e
4 changed files with 32 additions and 33 deletions

View File

@ -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)),

View File

@ -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(