Exemplo n.º 1
0
    def start_server(app_io_loop, app_start_lock):
        # initialize db by hand because we need it in the worker thread
        config.db_conf = {'type': 'sqlite', 'url': ':memory:'}
        db_init()
        load_dev_fixtures(config.db)

        app = mkapp()
        server = HTTPServer(app, io_loop=app_io_loop)
        server.add_socket(unused_port[0])
        app_io_loop.add_callback(callback=app_start_lock.release)
        app_io_loop.start()
Exemplo n.º 2
0
def app(db):
    return mkapp()