import os from main import application application.debug = True application.config['SECRET_KEY'] = 'secret!' port = os.getenv('APP_PORT', '5000') if __name__ == '__main__': application.run(debug=True, host='0.0.0.0', port=int(port))
''' WSGI Initializer ''' import logging from main import application from flask import current_app from service.request_handler import FLPORequestHandler if __name__ == "__main__": # logging.basicConfig(filename='werkzeug.log', level=logging.ERROR) logging.basicConfig(stream=sys.stderr, level=current_app.config["LOG_LEVEL"]) LOGGER = logging.getLogger('werkzeug') LOGGER.setLevel(logging.ERROR) application.run(request_handler=FLPORequestHandler)
from main import application __author__ = 'Gangeshwar' if __name__ == '__main__': application.run(debug=True)
from main import application if __name__ == "__main__": application.run()
""" This file needed for heroku, PORT is a heroku var """ from main import application if __name__ == '__main__': application.run(host='0.0.0.0', port=PORT, ssl_context='adhoc')
""" Copyright (C) Cortic Technology Corp. - All Rights Reserved Written by Michael Ng <*****@*****.**>, November 2019 """ import sys sys.path.insert(0, '/opt/cortic_modules') from main import application if __name__ == "__main__": application.run(host="0.0.0.0", port=80, threaded=True)
from main import application import sqlite3 import config # Author Yassine Ahmed Ali conn = sqlite3.connect("urls.db") cur = conn.cursor() cur.execute("SELECT count(name) FROM sqlite_master WHERE type='table'") #? if the count is 1, then table exists if not cur.fetchone()[0] == 1: {cur.execute("CREATE TABLE urltable (original,shortened)")} cur.close() conn.close() if __name__ == "__main__": application.run(host=config.HOST, debug=config.DEBUG)
from main import application if __name__ == "__main__": application.run(port=80)
from main import application try: from dotenv import load_dotenv load_dotenv() except: pass if __name__ == "__main__": application.run(host="0.0.0.0", debug=True) #app.run(debug=True)
from main import application if __name__ == '__main__': application.run('0.0.0.0', 5000)
from main import application if __name__ == '__main__': application.run(debug=False)
from main import application if __name__=="__main__": application.run()
from main import application if __name__ == "__main__": application.run(host="0.0.0.0", port="5000")