#!/usr/bin/env python from demo import app if __name__ == "__main__": app.debug = True app.run(host='0.0.0.0')
from demo import app if __name__ == "__main__": app.run(host='0.0.0.0', port=8000, debug=True)
def runserver(config=None): app.run()
#!/usr/bin/env python import sys sys.path.append('/var/www/lib') from demo import app if __name__ == "__main__": app.debug = True app.run(host='0.0.0.0', port=5003)
''' from app import app if __name__=='__main__': app.run() ''' from demo import app app.debug=True if __name__=='__main__': app.run()
import os from demo import app app.config['DEBUG'] = os.environ.get('FLASK_DEBUG', True) host = os.environ.get('FLASK_HOST', '0.0.0.0') port = os.environ.get('FLASK_PORT', 5000) if __name__ == "__main__": app.run(host=host, port=port)
def main(req, res): app.run(req, res)
from demo import app if __name__ == '__main__': app.run('www.xyz.com', port=80)
""" This script runs the myFlask application using a development server. """ from os import environ from demo import app if __name__ == '__main__': HOST = environ.get('SERVER_HOST', '0.0.0.0') try: PORT = int(environ.get('SERVER_PORT', '80')) except ValueError: PORT = 5555 app.run(HOST, PORT, debug=True)
from demo import app import os port = int(os.environ.get("PORT", 5000)) app.run(host='0.0.0.0', port=port)
#!flask/bin/python # Flask/MondoDB/GraphAPI demo app # Author: Joseph Edwards VIII # Date: 04/23/2014 if __name__ == '__main__': from demo import app app.run(debug = True)
from demo import app app.run(host='0.0.0.0')
from demo import app if __name__ == '__main__': app.run(debug=True, use_reloader=True)
import sys from demo import app app.run("127.0.0.1", 80, debug=True)
"name": name, "donGia": donGia, "quantity": 1 } session['book_cart'] = book_cart quan = util_pay.book_cart_stats(book_cart) return jsonify({ "total_quantity": quan }) @app.route('/api/submit-buybook', methods=['post']) @decorator.login_required def submit_buybook(): if util_pay.add_book(session.get('book_cart')): del session['book_cart'] return jsonify({ "message": "Add receipt successful!", "err_code": 200 }) return jsonify({ "message": "Failed" }) if __name__ =="__main__": app.run(debug=True)
from demo import app, db, manager from models import Player from flask import render_template from flask.ext.babel import gettext as _ db.create_all() manager.create_api(Player, methods=["GET", "POST", "DELETE"]) @app.route('/') def index(): return render_template('index.html') if __name__ == "__main__": app.run()
import os from demo import app if __name__ == '__main__': app.run(host="localhost", port=5009)
from demo import app if __name__ == '__main__': app.run(host='0.0.0.0', debug=True)