2018-05-24 19:13:55 +02:00
|
|
|
// <resource>
|
2019-06-19 06:20:50 +02:00
|
|
|
use actix_web::{web, App, HttpRequest, HttpResponse};
|
2018-05-24 19:13:55 +02:00
|
|
|
|
2019-06-17 08:08:42 +02:00
|
|
|
fn index(_req: HttpRequest) -> HttpResponse {
|
2018-05-24 19:13:55 +02:00
|
|
|
unimplemented!()
|
|
|
|
}
|
|
|
|
|
2019-06-19 06:20:50 +02:00
|
|
|
pub fn main() {
|
2018-05-24 19:13:55 +02:00
|
|
|
App::new()
|
2019-06-17 10:12:11 +02:00
|
|
|
.service(web::resource("/prefix").to(index))
|
2019-06-17 08:08:42 +02:00
|
|
|
.service(
|
|
|
|
web::resource("/user/{name}").route(web::get().to(|| HttpResponse::Ok())),
|
|
|
|
);
|
2018-05-24 19:13:55 +02:00
|
|
|
}
|
|
|
|
// </resource>
|