1
0
mirror of https://github.com/actix/examples synced 2025-06-29 02:10:36 +02:00

Make cookie-session example clarify (#175)

This commit is contained in:
Yuki Okushi
2019-09-14 19:37:39 +09:00
committed by GitHub
parent 2b4e360adc
commit d9ca7cb055
3 changed files with 13 additions and 1 deletions

View File

@ -28,6 +28,7 @@ fn index(session: Session, req: HttpRequest) -> Result<&'static str> {
fn main() -> std::io::Result<()> {
std::env::set_var("RUST_LOG", "actix_web=info");
env_logger::init();
let sys = actix_rt::System::new("cookie-session");
HttpServer::new(|| {
App::new()
@ -38,5 +39,8 @@ fn main() -> std::io::Result<()> {
.service(web::resource("/").to(index))
})
.bind("127.0.0.1:8080")?
.run()
.start();
println!("Starting http server: 127.0.0.1:8080");
sys.run()
}