export Handler

This commit is contained in:
Nikolay Kim 2017-11-29 13:41:51 -08:00
parent 16ceb741b8
commit 427566b90d
4 changed files with 7 additions and 8 deletions

View file

@ -72,7 +72,6 @@ extern crate env_logger;
use actix::*;
use actix_web::*;
struct MyWebSocket;
/// Actor with http context
@ -112,7 +111,8 @@ fn main() {
.middleware(middlewares::Logger::default())
// websocket route
.resource("/ws/", |r| r.get(|req| ws::start(req, MyWebSocket)))
.route_handler("/", StaticFiles::new("examples/static/", true)))
// static files
.route("/", StaticFiles::new("examples/static/", true)))
.serve::<_, ()>("127.0.0.1:8080").unwrap();
Arbiter::system().send(msgs::SystemExit(0));