コード例 #1
0
ファイル: bootstrapper.py プロジェクト: smulloni/satimol
def bootstrap(app=None,
              *configfiles):
    """

    Steps in bootstrapping:

    1. configuration must be read (or it may be initialized already)
    2. services must be loaded if they are present.
    3. the app must be built if it is not passed in.
    4. the server must be started.
    
    """
    if configfiles:
        Configuration.load(*configfiles)
    _setup_logging(Configuration.logConfig)
    load_services()
    if not app:
        app=make_app()
    run(app)