Configuring the framework

The config.yaml file has the configuration for the fully functioning Nameko. First, we inform Nameko of the access route to the message broker, in this case, the RabbitMQ:

AMQP_URI: 'amqp://guest:guest@rabbitmq'

Then, we pass the route to access the database, thus allowing the dependency injection by Nameko:

 
DB_URIS: 
    "command_famous:Base": ${COMMANDDB_DEV_HOST} 
 

The next setting refers to the logging level that should be used by our application:

LOGGING: 
    version: 1 
    handlers: 
        console: 
            class: logging.StreamHandler 
    root: 
        level: DEBUG 
        handlers: [console] 

The complete config.yaml file has the following configuration:

AMQP_URI: 'amqp://guest:guest@rabbitmq' 
 
DB_URIS: 
    "command_famous:Base": ${COMMANDDB_DEV_HOST} 
 
LOGGING: 
    version: 1 
    handlers: 
        console: 
            class: logging.StreamHandler 
    root: 
        level: DEBUG 
        handlers: [console] 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.27.58