Setup
infra.db.setup
Summary
Database setup — connection lifecycle only. No domain imports.
Connect and disconnect the shared Mongo connection manager at application startup and shutdown.
Functions
setup_database
async
Connect the shared Mongo connection manager.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
uri |
str
|
Mongo connection URI. |
required |
db_name |
str
|
Target database name. |
required |