Example #1
0
    def handle(self, app, host, port, use_debugger, use_reloader):
        try:
            config = "flaskr.config.DevelopConfig"
            app.config.from_object(config)

            toolbar = DebugToolbarExtension(app)
            # from flaskext.lesscss import lesscss
            # lesscss(app)
        except:pass

        app.run(host=host,
                port=port,
                debug=use_debugger,
                use_reloader=use_reloader,
                **self.server_options)
Example #2
0
from flaskr import app


@app.route("/")
def hello_world():
    return "hello world!"


if __name__ == '__main__':
    app.run(threaded=True)
Example #3
0
import os
from flaskr import app

port = os.environ.get("PORT", "5000")

#app.run()
app.run(host="0.0.0", port=int(port))
Example #4
0
from flaskr import app
from flasgger import Swagger

swagger = Swagger(app)
app.config.from_object("settings.DevelopmentConfig")

if __name__ == '__main__':
    app.run(port=12004)
Example #5
0
from flaskr import app


if __name__=='__main__':
    app.run(debug=True,port=2800)
Example #6
0
from flaskr import app

if __name__ == '__main__':
    import argparse
    parser = argparse.ArgumentParser(description='Test for argparse')
    parser.add_argument('--port', '-p', help='程序端口,默认8220', default='8220')
    parser.add_argument('--host',
                        '--host',
                        help='程序Host,默认127.0.0.1',
                        default='127.0.0.1')
    args = parser.parse_args()
    app.run(host=args.host, port=int(args.port))
Example #7
0
from flaskr import app
import os

if __name__ == '__main__':
    app.run(debug=True, host='0.0.0.0', port=os.environ.get('PORT'))
Example #8
0
def run():
    app.run(host='127.0.0.1', port=5000, debug=True)
Example #9
0
def run (debug):
    app.run (debug=debug)
Example #10
0
# -*- coding: utf-8 -*-

from flaskr import app

app.run(host="localhost", port=8000, debug=True)
Example #11
0
#!/usr/bin/env python

from flaskr import app

if __name__ == '__main__':
    app.debug = True
    app.run(host='localhost', port=5000)
Example #12
0
import os

from flaskr import app

if __name__ == '__main__':
    port = int(os.environ.get('PORT', 5000))
    app.config.from_pyfile('config.py')
    app.run(host='127.0.0.1', port=port, debug=True)
Example #13
0
from flask import Flask
from flaskr import app

#Runs the application, execute this file via a command prompt
if __name__ == '__main__':
    app.run(host='0.0.0.0', port=1000)
Example #14
0
from flaskr import app
import os

if not os.path.exists("./flaskr/flaskr.db"):
    from flaskr.models import init
    init()
app.run(host='0.0.0.0', port=int(os.environ.get("PORT", 5000)))
Example #15
0
from flaskr import app

app.run('0.0.0.0', port=5000, debug=False)
Example #16
0
#!myvenv/bin/python

from flaskr import app

app.run(host='0.0.0.0', debug=True)
Example #17
0
# coding: utf-8

from flaskr import app
app.run('0.0.0.0', debug=True)
Example #18
0
from flaskr import init_db, app
from sqlite3 import OperationalError
import config

if __name__ == '__main__':
    try:
        init_db()
    except OperationalError:
        print "DB exists! continuing to run app on ", config.DevelopmentConfig.SERVER_NAME
    app.run('0.0.0.0')
Example #19
0
from flaskr import app

app.run('0.0.0.0', port=5000, debug=True)
Example #20
0
from flaskr import app
app.run(host='0.0.0.0', port=4141, debug=False)
Example #21
0
from __future__ import print_function
from flask.ext.script import Manager
from flaskr import app, db

manager = Manager(app)

@manager.command
def init_db():
    db.create_all()

if __name__ == '__main__':
#    manager.run()
    app.run(host='0.0.0.0', port=5000, debug=True)

Example #22
0
#!/usr/bin/env python
from flaskr import app
app.run(debug=True)
Example #23
0
from flaskr import app

app.run(host='127.0.0.1', port=5001, debug=True)
Example #24
0
def runWeb():
    app.debug=True
    app.run()
Example #25
0
from flaskr import app

app.run('127.0.0.1', port=5001, debug=False)
Example #26
0
from flaskr import app

#
if __name__ == "__main__":
    app.run(host='localhost', debug=True)
    #app.run(host='localhost', port=80, debug=True)
Example #27
0
from flaskr import app
from flaskr.models import db, User, session
from flaskr import views
import sys

print("db.create_all()")
db.create_all()  # create database if not already there

users = session().query(User).all()
print(users)

print(f"app.run() sys.argv={sys.argv[1:]}")
# start Flask web service
if '--local' in sys.argv:
    app.run(host='127.0.0.1', debug=True, port=80)
else:
    app.run(host='0.0.0.0', debug=True, port=80)


Example #28
0
from flaskr import app

app.run(host="192.168.100.103", port=4000, debug=True)
Example #29
0
from os import environ
from flaskr import app

if __name__ == '__main__':
    HOST = environ.get('SERVER_HOST', 'localhost')
    try:
        PORT = int(environ.get('SERVER_PORT', '8080'))
    except ValueError:
        PORT = 8080
    app.run(HOST, PORT)
Example #30
0
#!/usr/bin/env python3.7
from flaskr import app

if __name__ == '__main__':
    app.run(debug=True, host='0.0.0.0')
Example #31
0
def runserver():
    app.run()
Example #32
0
from flaskr import app
app.run(host='192.168.56.103', port=5000, debug=True)
Example #33
0
from os import environ
from flaskr import app

if __name__ == '__main__':
    HOST = environ.get('SERVER_HOST', 'localhost')
    try:
        PORT = int(environ.get('SERVER_PORT', '5500'))
    except ValueError:
        PORT = 5555

    app.run(HOST, PORT, debug=True)
Example #34
0
from flaskr import app
app.run()
Example #35
0
def runserver():
    app.run()
Example #36
0
from flaskr import app

if __name__ == "__main__":
    app.run(host="0.0.0.0", port=1448, debug=True)

    #app.run(debug=True)
Example #37
0
from flaskr import app

app.run(host='0.0.0.0', port=5000, debug=True)
Example #38
0
from flaskr import app

# app.run(host='127.0.0.1', port=5000, debug=True)
app.run(host='0.0.0.0')
Example #39
0
import os
from flaskr import app

if __name__ == '__main__':
    if os.environ.get("TEST") == "y":
        os.execlp("pytest", "-v")

    debug = os.environ.get("FLASK_DEBUG", False)

    if os.environ.get("SEED") == "y":
        from flaskr.seed import seed_all
        seed_all()

    app.run(host="0.0.0.0", port=8080, debug=debug)
Example #40
0
from flaskr import app
from flask import render_template


@app.route('/')
def index():
    return render_template('home.html')


if __name__ == '__main__':
    app.run(debug=True)
from flaskr import app
app.run(host='127.0.0.1', port=5000, debug=True)