mirror of
https://github.com/actix/actix-extras.git
synced 2025-06-25 09:59:21 +02:00
refactor server router
This commit is contained in:
@ -12,14 +12,14 @@ use futures::Future;
|
||||
use tokio_core::net::{TcpStream, TcpListener};
|
||||
|
||||
|
||||
fn create_server<T, A>() -> HttpServer<T, A> {
|
||||
fn create_server<T, A>() -> HttpServer<T, A, Application<()>> {
|
||||
HttpServer::new(
|
||||
RoutingMap::default()
|
||||
.resource("/", |r|
|
||||
r.handler(Method::GET, |_, _, _| {
|
||||
httpcodes::HTTPOk
|
||||
}))
|
||||
.finish())
|
||||
vec![Application::default("/")
|
||||
.resource("/", |r|
|
||||
r.handler(Method::GET, |_, _, _| {
|
||||
httpcodes::HTTPOk
|
||||
}))
|
||||
.finish()])
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
Reference in New Issue
Block a user