예제 #1
0
def main():
    config = ApplicationConfig()
    context = Context()
    app = configure_app(config, context)
    app.run(host=config.sanic.host,
            port=config.sanic.port,
            workers=config.sanic.workers,
            debug=config.sanic.debug)
예제 #2
0
파일: main.py 프로젝트: DmitryCS/tasks
def main():
    config = ApplicationConfig()
    context = Context()
    app = configure_app(config, context)
    app.run(
        host=config.sanic.host,
        port=config.sanic.port,
        workers=config.sanic.
        workers,  # number of application instances to be saved to the server (that will work)
        debug=config.sanic.debug)
예제 #3
0
def main():
    """
    Главная функция для запуска всего приложения
    """
    config = ApplicationConfig()
    context = Context()
    app = configure_app(config, context)

    app.run(
        host=config.sanic.host,
        port=config.sanic.port,
        workers=config.sanic.workers,
        debug=config.sanic.debug,
    )
예제 #4
0
# файл main.py необходим исключительно для запуска программы

from transport.sanic.configure_sanic import configure_app
from configs.config import ApplicationConfig
from context import Context

# запускаем программу
if __name__ == '__main__':
    config = ApplicationConfig()
    context = Context()
    app = configure_app(config, context)

    app.run(
        host=config.sanic.host,
        port=config.sanic.port,
        workers=config.sanic.workers,
        debug=config.sanic.debug,
    )