def run(): """Run development server""" # Retrieve port from environment, if none available, use 8080 # Allows flexibility for servers that don't use fixed outgoing ports port = int(os.environ.get('PORT', 8080)) # Start application development server app.run(host='0.0.0.0', port=port)
def serve(): """Host blog on http://localhost:5000""" app.config["BLOG"]["posts"] = sorted(load(["posts", "drafts"]), key=lambda post: post.revdate, reverse=True) app.config["BLOG"]["base_path"] = "/" app.run(debug=True)
#!/usr/bin/env python from blog import app import os app.debug = True if __name__ == '__main__': port = int(os.environ.get("PORT", 5001)) app.run(port=port,host='0.0.0.0')
from blog import app if __name__ == "__main__": app.run(debug=True, host="0.0.0.0")
from blog import app if __name__ == "__main__": import argparse parser = argparse.ArgumentParser(description='Development Server Help') parser.add_argument("-d", "--debug", action="store_true", dest="debug_mode", help="run in debug mode (for use with PyCharm)", default=False) parser.add_argument("-p", "--port", dest="port", help="port of server (default:%(default)s)", type=int, default=11917) cmd_args = parser.parse_args() app_options = {"port": cmd_args.port, 'host': '0.0.0.0', 'threaded': True} if cmd_args.debug_mode: app_options["debug"] = False app_options["use_debugger"] = False app_options["use_reloader"] = False app.run(**app_options)
from blog import app if __name__ == '__main__': app.run(debug=True) //
#!/usr/bin/env python import os import os.path from database import init_db from blog import app, DATABASE, JDBC_URL, JDBC_DRIVER if __name__ == "__main__": if not os.path.exists(DATABASE): init_db(JDBC_URL, JDBC_DRIVER) app.run(host="0.0.0.0", port=18080)
from blog import app if __name__ == '__main__': app.config['SECRET_KEY'] = 'key' app.run(debug=True, port=5001)
from blog import app, manager if __name__ == '__main__': #manager.run() app.run(host="0.0.0.0", debug=True)
from blog import app if __name__ == '__main__': app.run(host='0.0.0.0', debug=True, port=80)
def run(): # Attempt to retrieve a port number from environment - 8080 if unavailable # Number of hosts use the PORT environment variable to tell the app port = int(os.environ.get('PORT', 8080)) app.run(host='0.0.0.0', port=port)
# @app.route('/login') # @oidc.require_login # def login(): # return 'Welcome {}!! Livinig in {}'.format(oidc.user_getfield('email'), oidc.user_getfield('address')) # # @app.route('/custom_callback') # @oidc.custom_callback # def callback(data): # return 'Hello. You submitted %s' % data # # # if __name__ == '__main__': # context = None # if app.config['BASE'].startswith("https"): # context = ssl.SSLContext(ssl.PROTOCOL_SSLv23) # context.load_cert_chain(app.config['SERVER_CERT'], app.config['SERVER_KEY']) # # app.run(ssl_context=context, host='127.0.0.1', port=8043, debug=True) from blog import app import ssl if __name__ == '__main__': context = None if app.config['BASE'].startswith("https"): context = ssl.SSLContext(ssl.PROTOCOL_SSLv23) context.load_cert_chain(app.config['SERVER_CERT'], app.config['SERVER_KEY']) app.run(ssl_context=context, host='127.0.0.1', port=8043, debug=True)
from blog import app if __name__ == '__main__': app.run(host='127.0.0.1', port=8080, debug=True)
from blog import app if __name__ == '__main__': app.run(host="0.0.0.0", port="5000", debug=True)
#__init__で作成されるアプリケーションを読み込む from blog import app if __name__ == "__main__": app.run(port=9999)
#!/usr/bin/env python from blog import app import os app.debug = True if __name__ == '__main__': port = int(os.environ.get("PORT", 5001)) app.run(port=port, host='0.0.0.0')
def run(): #try to retrieve a port number from environment, falling back to 5000 if unvailable port = int(os.environ.get('PORT', 5000)) #run the development server, telling it to listen to the port retrieved app.run(host='0.0.0.0', port=port) """
from blog import app import blog.views if __name__ == "__main__": app.run(host=app.config['HOST'], port=app.config['PORT'])
def run(): port = int(os.environ.get('PORT', 5000)) app.run(host='localhost', port=port)
from blog import app if __name__ == '__main__': app.run()
from blog import app # parla proprio di "app variable" import os # enable to use on heroku, disable otherwise app.secret_key = os.urandom(24) port = int(os.environ.get("PORT", 5000)) app.run(host="0.0.0.0", port=port, debug=True) # heroku ci fornisce una variabile ambintale che è la porta su cui facciamo girare la app # enable to use locally, disable otherwise # app.run(debug=True)
#!/usr/bin/env python # coding: utf-8 from blog import app as application if __name__ == "__main__": application.debug = True application.run(host='0.0.0.0', port=8000)
from blog import app from blog import route from blog import forms from blog import model if __name__ == "__main__": app.run(host='0.0.0.0', debug=True)
def run(): port = int(os.environ.get('PORT', 5001)) app.run(host='127.0.0.1', port=port)
def run(): port = int(os.environ.get('PORT', 8080)) app.run(host='0.0.0.0', port=port)
from blog import app as application if __name__ == "__main__": application.run(debug=True)
from blog import app if __name__ == '__main__': app.run(host='0.0.0.0', port=5000)
from blog import app, models, db @app.shell_context_processor def shell_vars(): vars = {'app': app, 'models': models, 'db': db} return vars app.run(port=5000)
def runserver(): app.run(host='0.0.0.0')
from blog import app import os app.secret_key = os.urandom(24) # running locally: # app.run(debug=True) # running on heroku port = int(os.environ.get("PORT", 5000)) app.run(host='0.0.0.0', port=port)
from blog import app if __name__ == '__main__': app.run(DEBUG=True)
def run(): port = int(os.environ.get('Port', 5000)) app.run(host='0.0.0.0', port = port)
def run(): port = int(os.environ.get('PORT', 8080)) #environ dictionary from os to get access to environment variables app.run(host='0.0.0.0', port=port)
from blog import app if __name__ == '__main__': app.run(host='0.0.0.0', debug=True, threaded=True, port=8100)
from blog import app import os if __name__=="__main__": app.run(host='0.0.0.0', port=os.getenv('PORT'))
from blog import app if __name__ == "__main__": app.run(debug=True, host="0.0.0.0", port=80)
from blog import app, config app.run(host=config.HOST, port=config.PORT, debug=config.DEBUG)
from blog import app if __name__ == '__main__': app.run(debug=True, port=int('12345'))
import config # import neo4j config from blog import app import os app.secret_key = os.urandom(24) port = int(os.environ.get('PORT', 5000)) app.run(host='0.0.0.0', port=port)
# -*- coding: utf-8 -*- from blog import app app.run(debug=app.config['DEBUG'], host=app.config['HOST'])
from blog import app if __name__ == "__main__": app.run(debug=True, host="0.0.0.0", port=18000)
# -*- coding: utf-8 -*- import sys reload(sys) sys.setdefaultencoding("utf-8") from blog import app import os app.secret_key = os.urandom(24) port = int(os.environ.get('PORT', 5001)) app.run(host='0.0.0.0', port=port, debug=True)
from blog import app import os app.secret_key = os.urandom(24) port = int(os.environ.get("PORT", 5000)) app.run(host="0.0.0.0", port=port)
# coding: utf-8 from blog import app if __name__ == "__main__": app.run(host="139.129.23.184", port=5000)
from blog import app import os app.secret_key = os.urandom(24) port = int(os.environ.get('PORT', 5000)) app.run(host="0.0.0.0", port=port)
#!/usr/bin/python3 #coding=utf8 from blog import app if __name__ == '__main__': app.run(host='0.0.0.0', port=80, debug=True)
from blog import app if __name__ == "__main__": app.run(debug=True, host='0.0.0.0')
def run(): port = int(os.environ.get('PORT', 8000)) app.run(host='0.0.0.0', port=port, debug=True)
from blog import app import os app.secret_key = os.urandom(24) app.config['DEBUG'] = True port = int(os.environ.get('PORT', 5000)) app.run(host='localhost', port=port)
from blog import app as application if __name__ == "__main__": application.run(host="0.0.0.0")
#conding = utf-8 from blog import app if __name__ == '__main__': app.run(debug=True)
def run(): """Start the flask app""" port = int(os.environ.get('PORT', 8080)) app.run(host='0.0.0.0', port=port)
flash('You are not a Authenticated User') return redirect(url_for('index')) @app.route('/logout') def logout(): session.clear() session['user_available'] = False oidc.logout() return redirect(url_for('index')) @app.route('/blog/api/v0.1/posts', methods=['GET']) def get_tasks(): posts = Posts.query.all() """for i in api_posts: title= i.title description = i.description data_dict= {'title': title, 'description': description}""" """for i in posts: t[i] = posts.title print(t)""" title = posts.title print(title) description = posts.description return jsonify(title=title, description=description) if __name__ == '__main__': app.run()
def run(): port = int(os.environ.get("PORT", 8080)) app.run(host="0.0.0.0", port=port)
#!/usr/bin/env python from blog import app app.run("0.0.0.0")