Example #1
0
import os
from werkzeug.serving import run_simple
from werkzeug.wsgi import DispatcherMiddleware
from werkzeug.contrib.fixers import ProxyFix
from sz_webapp import frontend


frontend_app = frontend.create_app()

application = ProxyFix(DispatcherMiddleware(None,
                                            {
                                                '/app': frontend_app,
                                            }))

if __name__ == "__main__":
    run_simple("0.0.0.0", 7100, application, use_debugger=True)
Example #2
0
# coding:utf-8



if __name__ == '__main__':
    from werkzeug.wsgi import DispatcherMiddleware
    from werkzeug.serving import run_simple
    from sz_webapp.frontend import create_app
    application = create_app()

    # application = DispatcherMiddleware(None, {
    #     '/backend': create_app(),
    # })
    run_simple("0.0.0.0", 5000, application, use_debugger=True, use_reloader=False)
Example #3
0
# coding:utf-8

from flask.ext.script import Manager, Shell
from flask.ext.migrate import Migrate, MigrateCommand

from sz_webapp.core import db
from sz_webapp.frontend import create_app

app = create_app()
migrate = Migrate(app, db)
manager = Manager(app)


def make_shell_context():
    return dict(app=app, db=db)


manager.add_command('shell', Shell(make_context=make_shell_context))
manager.add_command('db', MigrateCommand)


if __name__ == "__main__":
    manager.run()