Example #1
0
def testserver():
    from flask_app.app import app
    app.config["DEBUG"] = True
    app.config["TESTING"] = True
    app.config["SECRET_KEY"] = "dummy secret key"
    app.run(port=8000, extra_files=[
        from_project_root("flask_app", "app.yml")
    ])
Example #2
0
def main(args):
    from gevent.wsgi import WSGIServer
    if args.debug:
        app.run(debug=True, port=config.app.TESTING_FRONTEND_TCP_PORT)
    else:
        http_server = WSGIServer(("0.0.0.0", config.app.APP_TCP_PORT), app)
        http_server.serve_forever()
    return 0
Example #3
0
def testserver(tmux):
    if tmux:
        return _run_tmux_frontend()
    from flask_app.app import app
    app.config["DEBUG"] = True
    app.config["TESTING"] = True
    app.config["SECRET_KEY"] = "dummy secret key"
    app.run(port=8000, extra_files=[from_project_root("flask_app", "app.yml")])
Example #4
0
def main(args):
    from gevent.wsgi import WSGIServer
    if args.debug:
        app.config["SECRET_KEY"] = "debug-secret-key"
        app.run(debug=True, port=config.deployment.www.testing_frontend_port)
    else:
        http_server = WSGIServer(("0.0.0.0", config.deployment.www.production_frontend_port), app)
        http_server.serve_forever()
    return 0
Example #5
0
def testserver(tmux):
    if tmux:
        return _run_tmux_frontend()
    from flask_app.app import app
    app.config["DEBUG"] = True
    app.config["TESTING"] = True
    app.config["SECRET_KEY"] = "dummy secret key"
    app.run(port=8000, extra_files=[
        from_project_root("flask_app", "app.yml")
    ])
Example #6
0
#!/usr/bin/env python3
from flask_app.app import app

#this is the file that will run
#also you dont hit run from vscode you bash flask run

if __name__ == "__main__":
    app.run()
Example #7
0
import os
import sys

import waitress

from flask_app.app import app

if __name__ == "__main__":
    if sys.argv[1] == "debug":
        app.run(debug=True)

    if sys.argv[1] == "production":
        waitress.serve(app,
                       host="0.0.0.0",
                       port=int(os.environ.get("PORT", 5000)))
Example #8
0
from flask_app.app import app as application

if __name__ == "__main__":
    application.run(debug=False)
Example #9
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@author:   LiuZhi
@time:     2019-01-13 23:10
@contact:  [email protected]
@software: PyCharm
"""

from flask_app.app import app
from flask_migrate import Migrate

from base.base_extend import db


def include_object(object, name, type_, reflected, compare_to):
    """
    模型管理器include规则
    """
    if type_ == 'table' and name.startswith('social_auth'):
        return False
    return True


migrate = Migrate(app, db, include_object=include_object)

if __name__ == '__main__':
    app.run(host='0.0.0.0', port=5000, debug=app.config['DEBUG'])
Example #10
0
from flask_app.app import app
from module import support_function as spf
# host = "192.168.50.33"
host = spf.get_host_ip()
app.run(host=host, debug=True)
Example #11
0
def runserver():
    """Run the flask app in development mode"""
    app.run('0.0.0.0', 8081)
Example #12
0
from flask_app.app import app

if __name__ == '__main__':
    app.run(host='localhost', port=3000)
Example #13
0
def runserver():
    """Run the flask app in development mode"""

    # app.run('0.0.0.0', 33507)
    port = int(os.environ.get('PORT', 5000))
    app.run(host='0.0.0.0', port=port)
Example #14
0
import sys

sys.path.insert(0, '/home/ubuntu/testing_workshop/')
from flask_app.app import app as application

if __name__ == "__main__":
    application.run()
def run_app():
    'Boots up flask_app on server.'
    app.run(debug=app.config['DEBUG'], port=app.config['PORT'])