from my_app import app #app.run(host='10.163.58.53',debug=True) app.run(host=app.config.get("HOST", "10.163.58.53"), port=app.config.get("PORT", 5001), debug=True)
''' Author: Rajat Gupta ''' from my_app import app app.run(host="0.0.0.0", port=8000, debug=True)
from my_app import app if __name__ == '__main__': app.run();
# -*- coding: utf-8 -*- from my_app import app app.run()
from my_app import app # Set host="0.0.0.0" and setup an SSH tunnel from host 127.0.0.1:5000 to # 0.0.0.0:5000 on the Vagrant VM to allow your browser to interact # with the Flask development server app.run(debug=True, host="0.0.0.0")
# From: https://code.tutsplus.com/tutorials/flask-authentication-with-ldap--cms-23101 from my_app import app app.run(debug=False, host='0.0.0.0')
from my_app import app app.run(debug=True) #,ssl_context='adhoc') #tai sao
def post(self): name = request.form.get('name') price = request.form.get('price') product = Product(name, price) db.session.add(product) db.session.commit() return jsonify({ product.id: { 'name': product.name, 'price': str(product.price), } }) def put(self, id): # Update the record for the provided id # with the details provided. return def delete(self, id): # Delete the record for the provided id. return product_view = ProductView.as_view('product_view') app.add_url_rule('/product/', view_func=product_view, methods=['GET', 'POST']) app.add_url_rule('/product/<int:id>', view_func=product_view, methods=['GET']) if __name__ == "__main__": app.run("0.0.0.0", port=80, debug=True)
import os from my_app import app if __name__ == "__main__": port = os.environ.get("PORT") or 5000 app.run(port=port)
from my_app import app app.run(debug=True,use_reloader=False)
# A very simple Flask Hello World app for you to get started with... import flask import json from my_app import app import server_io @app.route('/json') def json_world(): return json.dumps(['foo', {'bar': ('baz', None, 1.0, 2)}]) @app.route('/') def hello_world(): return "hallo from flask v" + str(flask.__version__) if __name__ == '__main__': app.run(host='127.0.0.1', port=5001)
from my_app import app if __name__ == '__main__': app.run(host="localhost", port=5000, debug=True)
from my_app import app if __name__ == '__main__': app.run(host='0.0.0.0', port=5000)
from my_app import app app.config.from_pyfile('config.py') #app.config.from_object('configuration.ProductionConfig') print(app.config['DEBUG']) app.run() #debug=True #app.config['debug']=True #app.debug=True
from my_app import app from my_app import moment from my_app import momentjs from datetime import datetime #set jinja template global #print("Static folder: ", app.static_folder) app.run(host='0.0.0.0', debug=True) timestamp = moment.create(datetime.utcnow()).calendar() #jinja_environ = app.create_jinja_environment() app.jinja_env.globals['momentjs'] = momentjs app.jinja_env.globals['timestamp'] = timestamp
from flask import Flask from my_app import app #initializes the app and the database if __name__ == '__main__': models.initialize() app.run(debug=True)
from my_app import app app.run(debug=True, host='0.0.0.0')
from my_app import app if __name__ == '__main__': app.run(host='127.0.0.1', port=5000, debug=True)
from my_app import app as application if __name__ == "__main__": application.run()
from my_app import app #app.config.from_pyfile('config.py') app.run(host='0.0.0.0', port='5000') #debug=True #app.config['debug']=True #app.debug=True
import os from my_app import app app.secret_key = os.urandom(12) app.run(host='set09103.napier.ac.uk',port='9134',debug=True)
from my_app import app app.run(host='0.0.0.0')
# _________________________________________ import os from dotenv import load_dotenv # os.path.expanduser(path) # On Unix and Windows, return the argument with an initial component of ~ or # ~user replaced by that user’s home directory. # print('->', os.getcwd()) # print('->', os.path.expanduser(os.getcwd())) project_folder = os.path.expanduser(os.getcwd()) load_dotenv(os.path.join(project_folder, '.env')) # print('->', os.environ['aws_access_key_id']) # _________________________________________ from my_app import app if __name__ == "__main__": app.run(host=os.getenv('FLAKS_RUN_HOST'), port=os.getenv('FLASK_RUN_PORT'))
# # Basic mod_WSGI file for AWS which REQUIRES the variable "application" for the flask app # from my_app import app as application if __name__ == "__main__": application.run(debug=False)
from my_app import app app.run(debug=True, ssl_context='adhoc', host='localhost', port='5000')
from my_app import app as application # Run the Flask development server from here if __name__ == '__main__': application.run(debug=True)
from dotenv import load_dotenv import os project_folder = os.path.expanduser(os.getcwd()) load_dotenv(os.path.join(project_folder, '.env')) from my_app import app if __name__ == "__main__": # app.run() app.run(host='0.0.0.0', port=5559)
def run(): port = int(os.environ.get('PORT', 5000)) app.run(host='0.0.0.0', port=port)
#!/usr/bin/env python3 from my_app import app # without livereload (vanilla Flask) if __name__ == "__main__": app.run(debug=True, host="0.0.0.0")
from my_app import app app.run(debug=True, host='0.0.0.0', port=32100)
from my_app import app app.run(debug=True, host='127.0.0.1', port=5000)
from my_app import app app.run(debug=True)
from my_app import app app.run(port=5300,debug=True)
from my_app import app app.run()
from my_app import app app.run(debug=False)