1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-25 09:59:21 +02:00

update examples

This commit is contained in:
Nikolay Kim
2017-12-07 18:08:16 -08:00
parent d595dd850e
commit 3f06439d3e
2 changed files with 4 additions and 4 deletions

View File

@ -30,11 +30,11 @@ fn main() {
let pkcs12 = Pkcs12::from_der(&pkcs12).unwrap().parse("12345").unwrap();
HttpServer::new(
Application::default("/")
Application::new("/")
// enable logger
.middleware(middlewares::Logger::default())
// register simple handler, handle all methods
.route("/index.html", |r| r.f(index))
.resource("/index.html", |r| r.f(index))
// with path parameters
.resource("/", |r| r.method(Method::GET).f(|req| {
httpcodes::HTTPFound