Exemple #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)
Exemple #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)
Exemple #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)
Exemple #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)
Exemple #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")
Exemple #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")
Exemple #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)
Exemple #8
0
def main():
    morepath.autosetup()
    morepath.run(app())
Exemple #9
0
def main():
    morepath.autosetup()
    morepath.run(App())
Exemple #10
0
def main():
    create_db()
    morepath.autosetup()
    #morepath.run(App())
    run_simple('localhost', 8080, App(), use_reloader=True)
Exemple #11
0
def prod():
    morepath.autosetup()
    waitress.serve(app.App())
Exemple #12
0
def dev():
    morepath.autosetup()
    run_simple('localhost', 8080, app.App(), use_reloader=True, use_debugger=True)