コード例 #1
0
    def __init__(self):
        app.load_configs([
            os.path.join(os.getcwd(), 'kbas.conf'),
            os.path.join(os.path.dirname(__file__), 'config', 'kbas.conf')
        ])
        app.config['start-time'] = datetime.now()
        app.config['last-upload'] = datetime.now()
        app.config['downloads'] = 0

        try:
            import cherrypy
            server = 'cherrypy'
        except:
            server = 'wsgiref'

        # for development:
        if app.config.get('mode') == 'development':
            bottle.run(server=server,
                       host=app.config['host'],
                       port=app.config['port'],
                       debug=True,
                       reloader=True)
        else:
            bottle.run(server=server,
                       host=app.config['host'],
                       port=app.config['port'],
                       reloader=True)
コード例 #2
0
ファイル: __main__.py プロジェクト: padrigali/ybd
    def __init__(self):
        app.load_configs([
            os.path.join(os.getcwd(), 'kbas.conf'),
            os.path.join(os.path.dirname(__file__), 'config', 'kbas.conf')])

        # for development:
        if app.config.get('mode') == 'development':
            bottle.run(host=app.config['host'], port=app.config['port'],
                       debug=True, reloader=True)
        else:
            bottle.run(host=app.config['host'], port=app.config['port'])
コード例 #3
0
ファイル: __main__.py プロジェクト: locallycompact/ybd
    def __init__(self):
        app.load_configs([
            os.path.join(os.getcwd(), 'kbas.conf'),
            os.path.join(os.path.dirname(__file__), 'config', 'kbas.conf')])
        app.config['start-time'] = datetime.datetime.now()

        try:
            import cherrypy
            server = 'cherrypy'
        except:
            server = 'wsgiref'

        # for development:
        if app.config.get('mode') == 'development':
            bottle.run(server=server, host=app.config['host'],
                       port=app.config['port'], debug=True, reloader=True)
        else:
            bottle.run(server=server, host=app.config['host'],
                       port=app.config['port'], reloader=True)