So im creating an app using several blueprints to keep my endpoints ordered, in my sanic app file i've a before_server_start listener creating the DB connection to mongo using motor.
I want to have access to this connection var from each blueprint because i will initialize a different model in every blueprint, i didnt find any of this in the docs, it is possible? there is any better solution?
use app.db = ... then in the blueprint use request.app.db to access it.
It worked, thanks, clossing this.
Most helpful comment
use
app.db = ...then in the blueprint userequest.app.dbto access it.