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:
@ -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()
|
||||
}
|
||||
|
Reference in New Issue
Block a user