Closed
Description
Add in documentation part (maybe into tutorial) where explaining why all connection, settings and etс, we add to the instance of application.
example:
async def init_pg(app):
conf = app['config']['postgres']
engine = await aiopg.sa.create_engine(
database=conf['database'],
user=conf['user'],
password=conf['password'],
host=conf['host'],
port=conf['port'],
minsize=conf['minsize'],
maxsize=conf['maxsize'],
)
app['db'] = enginePlease don't forget:
- add screenshot with your part of documentation
- write below that u want to take it to work