Replies: 2 comments 2 replies
-
mongo drivers default to tokio 0.2 runtime which is supported directly by actix-web. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Check out this example for a general guide: https://github.com/actix/examples/blob/master/async_db/src/main.rs. App::new()
.data(db.clone())
...
pub async fn status(state: web::Data<Database>) { ... } |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am new with rust and would like to use the official mongo driver with actix-web. But I really do not know how.
The default of the mongo driver ist async which makes things not easier.
So it would be great if anybody can give me an example how to do this....
Beta Was this translation helpful? Give feedback.
All reactions