mirror of
https://github.com/actix/examples
synced 2025-06-29 10:14:58 +02:00
Updated other/data-factory to v4. (#518)
This commit is contained in:
committed by
GitHub
parent
5cf5295ea9
commit
4174a4c62f
@ -15,13 +15,13 @@ async fn main() -> std::io::Result<()> {
|
||||
.await
|
||||
.expect("fail to build pool");
|
||||
|
||||
let pool = RedisWrapper(pool);
|
||||
let pool = Data::new(RedisWrapper(pool));
|
||||
|
||||
HttpServer::new(move || {
|
||||
let redis_url = redis_url.clone();
|
||||
|
||||
App::new()
|
||||
.data(pool.clone())
|
||||
.app_data(pool.clone())
|
||||
// a dummy data_factory implementation
|
||||
.data_factory(|| {
|
||||
/*
|
||||
|
Reference in New Issue
Block a user