services:
    ioc.extra.tornado.router:
        class: ioc.extra.tornado.router.Router

    ioc.extra.tornado.application:
        class: tornado.web.Application
        arguments: []
        kwargs:
            debug:                   False
            autoreload:              False
            compiled_template_cache: False
            static_hash_cache:       False
            serve_traceback:         False
            gzip:                    True
            cookie_secret:           MySecret

    ioc.extra.tornado.asset_helper:
        class: ioc.extra.tornado.router.AssetHelper
        arguments: [ "%ioc.extra.tornado.static_public_path%", '@ioc.extra.tornado.router', 'element.static']

    ioc.extra.tornado.command.server:
        class: ioc.extra.tornado.command.StartCommand
        arguments:
            - '@ioc.extra.tornado.application'
            - '@ioc.extra.tornado.router'
            - '@ioc.extra.event_dispatcher'

        tags:
            command:
                - { name: 'tornado:start' }