Skip to content

docs: explain why all setups we set to app #4137

Closed
@Arfey

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'] = engine

Please don't forget:

  • add screenshot with your part of documentation
  • write below that u want to take it to work

Metadata

Assignees

Labels

HacktoberfestWe think it's good for https://hacktoberfest.digitalocean.com/documentationImprovements or additions to documentationgood first issueGood for newcomers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions