Remove global db engine variable in app router. We instead use the global variable inside the db.engine module and use methods to access the connection pool
Make all api router usage of db session through fastapi's dependency injection subsystem
Added API_URL to docker-compose.yml
Remarks
This is in preparation for introducing asyncpg and to break up the app router into smaller routers.
Also tested that the exception handlers can catch errors in sub-routers (which apparently couldn't do before)
Changes
engine
variable in app router. We instead use the global variable inside thedb.engine
module and use methods to access the connection poolAPI_URL
todocker-compose.yml
Remarks
asyncpg
and to break up the app router into smaller routers.