mirror of
https://github.com/actix/examples
synced 2025-06-28 09:50:36 +02:00
v3 examples (#364)
This commit is contained in:
@ -5,11 +5,10 @@ authors = ["dowwie <dkcdkg@gmail.com>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
actix = "0.9.0"
|
||||
actix-rt = "1.0.0"
|
||||
actix-web = "2.0.0"
|
||||
actix-redis = "0.8.0"
|
||||
futures = "0.3.1"
|
||||
redis-async = "0.6.1"
|
||||
serde = { version = "1.0.71", features = ["derive"] }
|
||||
actix = "0.10"
|
||||
actix-web = "3"
|
||||
actix-redis = "0.9"
|
||||
futures = "0.3"
|
||||
redis-async = "0.6.3"
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
env_logger = "0.7"
|
||||
|
@ -1,12 +1,9 @@
|
||||
#[macro_use]
|
||||
extern crate redis_async;
|
||||
use serde::Deserialize;
|
||||
|
||||
use actix::prelude::*;
|
||||
use actix_redis::{Command, RedisActor};
|
||||
use actix_web::{middleware, web, App, Error as AWError, HttpResponse, HttpServer};
|
||||
use futures::future::join_all;
|
||||
use redis_async::resp::RespValue;
|
||||
use redis_async::{resp::RespValue, resp_array};
|
||||
use serde::Deserialize;
|
||||
|
||||
#[derive(Deserialize)]
|
||||
pub struct CacheInfo {
|
||||
@ -74,7 +71,7 @@ async fn del_stuff(redis: web::Data<Addr<RedisActor>>) -> Result<HttpResponse, A
|
||||
}
|
||||
}
|
||||
|
||||
#[actix_rt::main]
|
||||
#[actix_web::main]
|
||||
async fn main() -> std::io::Result<()> {
|
||||
std::env::set_var("RUST_LOG", "actix_web=trace,actix_redis=trace");
|
||||
env_logger::init();
|
||||
|
Reference in New Issue
Block a user