1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-26 15:07:42 +02:00

prepare codegen 0.4.0 release (#1702)

This commit is contained in:
Rob Ede
2020-09-24 23:54:01 +01:00
committed by GitHub
parent 162121bf8d
commit c53e9468bc
14 changed files with 124 additions and 69 deletions

View File

@ -1,12 +1,14 @@
use actix_web::*;
use actix_web_codegen::*;
#[route("/")]
async fn index() -> impl Responder {
HttpResponse::Ok()
async fn index() -> String {
"Hello World!".to_owned()
}
#[actix_web::main]
async fn main() {
use actix_web::{App, test};
let srv = test::start(|| App::new().service(index));
let request = srv.get("/");