Exemple #1
0
                           css_path=css_path,
                           images_path=images_path,
                           fonts_path=fonts_path)


@app.route('/dll-error')
def dll_error_page():
    return render_template('/dll_error.html',
                           code='DLL',
                           name='DLL Load Error',
                           version=params.VERSION,
                           environment=params.ENV,
                           js_path=js_path,
                           css_path=css_path,
                           images_path=images_path,
                           fonts_path=fonts_path)


if __name__ == '__main__':
    local_host = socket.gethostbyname(socket.gethostname())
    startup_thread = startup.StartupThread(local_host)
    startup_thread.start()

    # Flask default server
    # app.run(debug=False, host=local_host, use_reloader=False)

    # Tornado
    http_server = HTTPServer(WSGIContainer(app))
    http_server.listen(5000)
    IOLoop.instance().start()
Exemple #2
0
                           js_path=js_path,
                           css_path=css_path,
                           images_path=images_path,
                           fonts_path=fonts_path)


@app.route('/update-config')
def update_config_page():
    return render_template('/update_config.html',
                           code='Config Needs Update',
                           name='Your Config File Needs to be Updated',
                           version=params.VERSION,
                           environment=params.ENV,
                           js_path=js_path,
                           css_path=css_path,
                           images_path=images_path,
                           fonts_path=fonts_path)


if __name__ == '__main__':
    # Check arguments
    parser = argparse.ArgumentParser()
    arg_help = 'Start ScreenBloom server without launching a browser. Uses existing config.'
    parser.add_argument('-q', '--silent', help=arg_help, action='store_true')
    args = parser.parse_args()

    # Initialize server
    local_host = utility.get_local_host()
    startup_thread = startup.StartupThread(local_host, 5000, args)
    startup.start_server(app, startup_thread)
Exemple #3
0
def launch_browser():
    local_host = socket.gethostbyname(socket.gethostname())
    startup_thread = startup.StartupThread(local_host)
    startup_thread.start()