Пример #1
0
def main():
    """Start REST ARI server

    """
    logging.basicConfig(level=logging.DEBUG)

    options = parse_commandline()

    # init orm
    generate_orm_classes(options.db_conn_string)

    # load users info
    if options.no_auth:
        Users.no_auth = True
    else:
        Users.load(options.users_file)

    # c = morepath.setup()
    # c.scan()
    # c.commit()

    morepath.autosetup()
    logger = logging.getLogger('waitress')
    logger.setLevel(logging.INFO)
    waitress.serve(staticApp, host=options.host, port=options.port)
Пример #2
0
def main():
    engine = sqlalchemy.create_engine('sqlite:///morepath_sqlalchemy.db')
    Session.configure(bind=engine)
    model.Base.metadata.create_all(engine)
    model.Base.metadata.bind = engine

    morepath.autosetup()
    run_simple('localhost', 8080, App(), use_reloader=True)
Пример #3
0
def main():
    engine = sqlalchemy.create_engine('sqlite:///morepath_sqlalchemy.db')
    Session.configure(bind=engine)
    model.Base.metadata.create_all(engine)
    model.Base.metadata.bind = engine

    morepath.autosetup()
    run_simple('localhost', 8080, App(), use_reloader=True)
Пример #4
0
def main():
    engine = sqlalchemy.create_engine('sqlite:///morepath_sqlalchemy.db')
    Session.configure(bind=engine)
    Base.metadata.create_all(engine)
    Base.metadata.bind = engine

    morepath.autosetup()
    morepath.run(app)
Пример #5
0
def main():
  engine = sqlalchemy.create_engine('sqlite:///morepath_sqlalchemy.db')
  Session.configure(bind=engine)
  Base.metadata.create_all(engine)
  Base.metadata.bind = engine

  morepath.autosetup()
  wsgi = App()
  waitress.serve(App(), host="localhost")
Пример #6
0
def main():
    engine = sqlalchemy.create_engine('sqlite:///morepath_sqlalchemy.db')
    Session.configure(bind=engine)
    Base.metadata.create_all(engine)
    Base.metadata.bind = engine

    morepath.autosetup()
    wsgi = App()
    waitress.serve(App(), host="localhost")
Пример #7
0
def main():
    engine = sqlalchemy.create_engine('sqlite:///morepath_react.db')
    Session.configure(bind=engine)
    Base.metadata.create_all(engine)
    Base.metadata.bind = engine

    morepath.autosetup()
    app = App()
    waitress.serve(app)
Пример #8
0
def main():
    morepath.autosetup()
    morepath.run(app())
Пример #9
0
def main():
    morepath.autosetup()
    morepath.run(App())
Пример #10
0
def main():
    create_db()
    morepath.autosetup()
    #morepath.run(App())
    run_simple('localhost', 8080, App(), use_reloader=True)
Пример #11
0
def prod():
    morepath.autosetup()
    waitress.serve(app.App())
Пример #12
0
def dev():
    morepath.autosetup()
    run_simple('localhost', 8080, app.App(), use_reloader=True, use_debugger=True)