from manager import app app.run(host="127.0.0.1", port=5000, debug=True)
#!/usr/bin/env python from manager import app app.run(host="0.0.0.0", port=8181, debug=True)
# coding=utf8 # Author: quheng from manager import app if __name__ == "__main__": app.run(debug=False)
'msg': 'user not existed', 'data': '' } } if all([username, password]): user = User.query.filter_by(nickname=username).first() if user: if user.check_password(password): rtn_status = status['0'] rtn_status['data'] = user.to_dict() return jsonify(rtn_status) return jsonify(status['-2']) return jsonify(status['-3']) elif all([mobile, password]): user = User.query.filter_by(mobile=mobile).first() if user: if user.check_password(password): rtn_status = status['0'] rtn_status['data'] = user.to_dict() return jsonify(rtn_status) return jsonify(status['-2']) return jsonify(status['-3']) else: return jsonify() if __name__ == "__main__": app.run()
# -*- coding:utf-8 -*- from manager import app app = app if __name__ == "__main__": app.run(host="0.0.0.0", port=80)
#!manager/flask/bin/python from manager import app app.run(host='0.0.0.0',debug=True)
# coding=utf8 # Author: quheng from manager import app if __name__ == "__main__": app.run(debug = False)
def runserver(): port = int(os.environ.get('PORT', 5000)) app.run(host='127.0.0.1', port=port)
from manager import app from manager import monitor_pool import threading if __name__ == '__main__': monitor_process = threading.Thread(target=monitor_pool.background_monitor) monitor_process.start() app.run(host='0.0.0.0', threaded=True)
from manager import app import a2 # import a5 app.run(host="127.0.0.1", port=5000, debug = True)
from manager import app import sys, threading from manager import rabbitmq app.debug = True app.secret_key = 'super secret developmentkey, not at all posted on github.' port = 80 if app.debug: try: port = int(sys.argv[1]) except IndexError: port = 8000 try: file_sync_thread = threading.Thread(target=rabbitmq.rec_update) file_sync_thread.setDaemon(True) file_sync_thread.start() except (KeyboardInterrupt, SystemExit): print 'Stopped thread' app.run(host='0.0.0.0', port=port, use_reloader=False)
from manager import app import sys, threading from manager import rabbitmq app.debug = True app.secret_key = 'super secret developmentkey, not at all posted on github.' port = 80 if app.debug: try: port = int(sys.argv[1]) except IndexError: port = 8000 try: file_sync_thread=threading.Thread(target=rabbitmq.rec_update) file_sync_thread.setDaemon(True) file_sync_thread.start() except (KeyboardInterrupt, SystemExit): print 'Stopped thread' app.run(host = '0.0.0.0', port=port, use_reloader=False)
from manager import app if __name__ == "__main__": app.run(debug=True)
from manager import app as application if __name__ == "__main__": application.run()
return data.content @app.route("/cluster") def cluster(): return render_template('cluster.html') @app.route("/error") def error(): return render_template('error.html') @app.route("/teste") def teste(): return render_template('teste.html') @app.errorhandler(404) def page_not_found(error): return render_template('error.html'),404 def hash_password(password): return pbkdf2_sha256.encrypt(password, rounds=25600) def verify_password(password, hash): return pbkdf2_sha256.verify(password, hash) app.run(host='0.0.0.0', port=5000)