2019-06-19 06:20:50 +02:00
|
|
|
pub mod cfg;
|
|
|
|
pub mod dhandler;
|
2019-06-26 00:20:36 +02:00
|
|
|
pub mod guard;
|
|
|
|
pub mod guard2;
|
2019-06-19 06:20:50 +02:00
|
|
|
pub mod minfo;
|
|
|
|
pub mod norm;
|
|
|
|
pub mod norm2;
|
|
|
|
pub mod path;
|
|
|
|
pub mod path2;
|
|
|
|
pub mod pbuf;
|
|
|
|
pub mod resource;
|
|
|
|
pub mod scope;
|
|
|
|
pub mod url_ext;
|
|
|
|
pub mod urls;
|
2018-05-24 19:13:55 +02:00
|
|
|
|
|
|
|
// <main>
|
2019-06-26 00:20:36 +02:00
|
|
|
use actix_web::{web, App, HttpResponse, HttpServer};
|
2018-05-24 19:13:55 +02:00
|
|
|
|
2019-06-26 00:20:36 +02:00
|
|
|
fn index() -> HttpResponse {
|
|
|
|
HttpResponse::Ok().body("Hello")
|
2018-05-24 19:13:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2019-06-26 00:20:36 +02:00
|
|
|
HttpServer::new(|| {
|
|
|
|
App::new()
|
|
|
|
.route("/", web::get().to(index))
|
|
|
|
.route("/user", web::post().to(index))
|
|
|
|
})
|
|
|
|
.bind("127.0.0.1:8088")
|
|
|
|
.unwrap()
|
|
|
|
.run()
|
|
|
|
.unwrap();
|
2018-05-24 19:13:55 +02:00
|
|
|
}
|
|
|
|
// </main>
|