actix/actix-website

Mention web::block() in database doc

shinglyu opened this issue · 1 comments

I see there were many questions around how to use a sync database API in the GitHub issues and gitter channel. Looks like the easiest and well-accepted method is to use web::block(). But the database documentation still only mention sync actors.

Expected Behavior

It would be nice to mention that web::block() is an option and point the reader to the example code.

Current Behavior

The doc only mentions sync actors, which requires a lot of boilerplate code and people keep asking in gitter or github issues.

Context

I apologize if this is already tracked in other documentation update PR, or web::block() is not that ready yet.

linked to #145