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)
from flaskr import app @app.route("/") def hello_world(): return "hello world!" if __name__ == '__main__': app.run(threaded=True)
import os from flaskr import app port = os.environ.get("PORT", "5000") #app.run() app.run(host="0.0.0", port=int(port))
from flaskr import app from flasgger import Swagger swagger = Swagger(app) app.config.from_object("settings.DevelopmentConfig") if __name__ == '__main__': app.run(port=12004)
from flaskr import app if __name__=='__main__': app.run(debug=True,port=2800)
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))
from flaskr import app import os if __name__ == '__main__': app.run(debug=True, host='0.0.0.0', port=os.environ.get('PORT'))
def run(): app.run(host='127.0.0.1', port=5000, debug=True)
def run (debug): app.run (debug=debug)
# -*- coding: utf-8 -*- from flaskr import app app.run(host="localhost", port=8000, debug=True)
#!/usr/bin/env python from flaskr import app if __name__ == '__main__': app.debug = True app.run(host='localhost', port=5000)
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)
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)
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)))
from flaskr import app app.run('0.0.0.0', port=5000, debug=False)
#!myvenv/bin/python from flaskr import app app.run(host='0.0.0.0', debug=True)
# coding: utf-8 from flaskr import app app.run('0.0.0.0', debug=True)
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')
from flaskr import app app.run('0.0.0.0', port=5000, debug=True)
from flaskr import app app.run(host='0.0.0.0', port=4141, debug=False)
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)
#!/usr/bin/env python from flaskr import app app.run(debug=True)
from flaskr import app app.run(host='127.0.0.1', port=5001, debug=True)
def runWeb(): app.debug=True app.run()
from flaskr import app app.run('127.0.0.1', port=5001, debug=False)
from flaskr import app # if __name__ == "__main__": app.run(host='localhost', debug=True) #app.run(host='localhost', port=80, debug=True)
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)
from flaskr import app app.run(host="192.168.100.103", port=4000, debug=True)
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)
#!/usr/bin/env python3.7 from flaskr import app if __name__ == '__main__': app.run(debug=True, host='0.0.0.0')
def runserver(): app.run()
from flaskr import app app.run(host='192.168.56.103', port=5000, debug=True)
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)
from flaskr import app app.run()
from flaskr import app if __name__ == "__main__": app.run(host="0.0.0.0", port=1448, debug=True) #app.run(debug=True)
from flaskr import app app.run(host='0.0.0.0', port=5000, debug=True)
from flaskr import app # app.run(host='127.0.0.1', port=5000, debug=True) app.run(host='0.0.0.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)
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)