from flaskapp import app from flask import request @app.route('/slack/debug', methods=['GET', 'POST']) def lol_bot(): print('Call to /slack/debug') result = '' for k, v in request.values.items(): result += f'{k!r}: {v!r}\n' return result if __name__ == '__main__': app.run()
#!/usr/bin/python from flaskapp import app app.run(debug = False, host='0.0.0.0',port=5555,threaded=True)
#!/usr/bin/env python from flaskapp import app app.run(host='0.0.0.0', debug = 'True')
exec(open(virtualenv).read(), dict(__file__=virtualenv)) except IOError: pass # # IMPORTANT: Put any additional includes below this line. If placed above this # line, it's possible required libraries won't be in your searchable path # from flaskapp import app #main(): if __name__ == '__main__': #application = imp.load_source('app', 'flaskapp.py') port = app.config['PORT'] ip = app.config['IP'] app_name = app.config['APP_NAME'] host_name = app.config['HOST_NAME'] app.run(host=ip,port=port)
#!/Users/ribeck/miniconda2/envs/insight_project/bin/python from flaskapp import app if __name__ == '__main__': app.run(host="0.0.0.0", debug = True)
def main(): app.run(host='0.0.0.0', port=5000, debug=True)
from flaskapp import app app.run(debug=app.config.get('DEBUG', False))
from flaskapp import app as application if __name__ == "__main__": application.run()
from flaskapp import app if __name__ == "__main__": app.run(debug=True, host='192.168.0.213')
#!/Users/ribeck/miniconda2/envs/insight_project/bin/python from flaskapp import app if __name__ == '__main__': app.run(host="0.0.0.0", debug=True)
def run_server(): app.run(host="0.0.0.0")
from flask import Flask from flask import request from flaskapp import app, db from Model.Recipe import Recipe from Model.User import User db.create_all() @app.after_request def apply_caching(response): response.headers["Access-Control-Allow-Credentials"] = "true" return response if __name__ == '__main__': app.run(host="0.0.0.0", port=5000)
from flaskapp import app app.run(host='0.0.0.0', port=3001, debug=True)
def main(): app.run(debug=False)
if no_content(content): return '', 400 try: DataSchema(strict=True).load(content).data except marshmallow.exceptions.ValidationError as e: return jsonify(e.messages), 400 return '', 200 @log_decor @app.route('/product', methods=['POST']) def post_similar_product(): content = request.json if no_content(content): return '', 400 try: DataSchema(strict=True).load(content).data except marshmallow.exceptions.ValidationError as e: return jsonify(e.messages), 400 return '', 200 ''' if __name__ == '__main__': setup_metrics(app) app.run(host="127.0.0.1", port="5000")
from flaskapp import app, db from flaskapp.models import User, Post # flask shell register the import after invoking the function @app.shell_context_processor def shell_processor_context(): return {'db': db, 'User': User, 'Post': Post} if __name__ == '__main__': app.run(debug=True, port=5001)
from flaskapp import app if __name__ == "__main__": app.run(host='0.0.0.0', port=8080, debug=True)
""" run.py - Run the Flask app """ from flaskapp import app if __name__ == '__main__': # Tells Flask to run, accessible from the specified host/port pair. Note # that the routes are loaded because of the import above. app.run(host='127.0.0.1', port=3001, debug=True)
from flaskapp import app if __name__ == '__main__': app.run()
from flaskapp import app if __name__ == '__main__': app.run(host='0.0.0.0', port=1099, threaded=True) # threaded는 여러 사람이 동시 접속을 가능하게 해줌
#!/usr/bin/env python from flaskapp import app app.run(host='0.0.0.0', port=5000, debug=True)
from flaskapp import app, db from flaskapp.models import User if __name__ == '__main__': app.run(debug=True)
def web(): from flaskapp import app app.run(debug=True)
from flaskapp import app if __name__ == "__main__": app.run(debug=True, host='0.0.0.0')
#!flask/bin/python import os from flaskapp import app, options if __name__ == "__main__": # print os.path.join(app.root_path, 'dev.py') # print os.path.exists(os.path.join(app.root_path, 'dev.py')) print app.root_path port = int(os.environ.get('PORT', 5060)) if options['dev']: app.run(host="127.0.0.1", port=port, debug=True) else: app.run(host="0.0.0.0", port=80, debug=True)
from flaskapp import app if __name__ == '__main__': app.run(debug=True, port=8040, host='0.0.0.0')
import subprocess import time import argparse parser = argparse.ArgumentParser() parser.add_argument( '--rebuild', help="forces mongo to clear data and rebuild its database", action="store_true") args = parser.parse_args() # runs database server subprocess.Popen(['mongod', '--dbpath', './mongodb']) # Used to allow the previous command to run time.sleep(3) if args.rebuild: print("mongo will rebuild its database") # clears data on the server subprocess.Popen(['mongo', '--quiet', '--eval', 'db.getMongo().getDBNames().forEach(function(i){db.getSiblingDB(i).dropDatabase()})']) time.sleep(3) # imports data into the server subprocess.Popen(['mongoimport', '-d', 'main_database', '-c', 'publications', '--type', 'csv', '--file', './flaskapp/static/csv/pubmed_trends2.csv', '--headerline']) subprocess.Popen(['mongoimport', '-d', 'main_database', '-c', 'funding', '--type', 'csv', '--file', './flaskapp/static/csv/NIHfunding.csv', '--headerline']) time.sleep(3) # runs webserver from Flask objects in package app.run(debug=True)
from flaskapp import app if __name__ == "__main__": app.run('0.0.0.0')