from os import environ from views import app if __name__ == '__main__': HOST = environ.get('SERVER_HOST', 'localhost') try: PORT = int(environ.get('SERVER_PORT', '5000')) except ValueError: PORT = 5555 app.run(HOST, PORT)
from views import app if __name__ == '__main__': app.run(host="0.0.0.0", port=8001, debug=True)
def main(): app.debug = True #toolbar = DebugToolbarExtension(app) app.run(host='0.0.0.0', port=8000)
def main(): create_tables() app.run(host='0.0.0.0', port=8080, debug=True)
#!/usr/bin/env python # # application.py -- A web server presenting a catalog of items # Author: Rudy Reeves from db import clear_database, create_category from views import app if __name__ == '__main__': test_category_1 = create_category("test_category_1") test_category_2 = create_category("test_category_2") app.secret_key = "lRYRXEimZGfbt3Q2TpD_6_Kj" app.debug = True app.run(host='0.0.0.0', port=8000)
# coding: utf8 import os.path from views import app as webdb from dbHandler import create_users_table from sql import DB_NAME import sys sys.path.append(r"./ComputerContest_BigData_EMR") import matplotlib as mtp mtp.use("Agg") def init_env(): webdb.secret_key = 'chEb0a69cf(b19e6f282d501,g8b' if not os.path.exists(DB_NAME): create_users_table() if __name__ == '__main__': init_env() webdb.run(debug=True, host='0.0.0.0') '''import logging logging.basicConfig(filename='error.log', format='%(asctime)s %(message)s', level=logging.WARNING) while True: try: webdb.run(host='0.0.0.0') except Exception as e: logging.warning(e) '''
from views import app if __name__ == "__main__": app.run(debug=True, port=9090)
"""Mog run file.""" import os from views import app port = int(os.environ.get('PORT', 5000)) app.run(host='0.0.0.0', port=port, debug=True)
#encoding: utf-8 from views import app if __name__ == '__main__': app.run(host='0.0.0.0', port=8888, debug=True)
from views import app import os PORT = int(os.getenv('PORT', 8080)) app.run(debug=True, port=PORT)
# The above is needed to set the correct encoding, see https://www.python.org/dev/peps/pep-0263/ try: from views import app import logging from logging.handlers import RotatingFileHandler except Exception as e: print '####', e raise # Logging stuff file_handler = RotatingFileHandler('log/log.log', 'a', 1 * 1024 * 1024, 10) file_handler.setFormatter(logging.Formatter('''#### %(asctime)s ==> %(levelname)s: %(message)s [in %(filename)s:%(lineno)d]''')) # Change logging.INFO to logging.DEBUG to see debugging verbose information file_handler.setLevel(logging.INFO) app.logger.setLevel(logging.INFO) app.logger.addHandler(file_handler) app.logger.info('Starting up...') if __name__ == "__main__": app.run(debug=True, host="0.0.0.0") # Only matter of style... file_handler.setFormatter(logging.Formatter('''#### %(asctime)s ==> %(levelname)s: %(message)s [in %(filename)s:%(lineno)d] ################''')) app.logger.info('Switching off..')
import os from views import app port = int(os.environ.get('PORT', 5000)) app.run(debug=False, host='0.0.0.0', port=port)
# coding:utf-8 from views import app if __name__ == '__main__': app.run(debug=True,port=9090)
import os from flaskext.markdown import Markdown from views import app Markdown(app) if __name__ == '__main__': app.run(host="0.0.0.0")
# run.py from views import app app.run(debug=False)
def ghz(): app.run(fl, port = 4448, host = '0.0.0.0')
from views import app # importing app in views to run app.run(debug=False, host='0.0.0.0') # debug = True -- Development # debug = False -- Production
def main(): ssl(app) db.init_app(app) app.run(ssl_context = ctx, host='0.0.0.0', port=8082)
from views import app ''' @app.route('/') def index(): d = s.read() return d ''' if __name__ == '__main__': app.run( host="localhost", port=10 ) #--> loacalhost/static/index.html si inex devient un template le sortir de static et le mettre dans template et donc enlever le '/static'
# project/run.py from views import app app.run(debug=True, host='0.0.0.0')
# --------------- AUTOSTART APP ------------------------ # To start globally in rc.local, this path needs to be added # Add: # python3 /home/pi/share/radioflask/__init__.py >> /home/pi/share/all_log.txt & # # to /etc/rc.local # import sys sys.path.append('/home/pi/.local/lib/python3.7/site-packages') from views import app, csrf from os import path, walk extra_dirs = ['./templates', './static'] extra_files = extra_dirs[:] for extra_dir in extra_dirs: for dirname, dirs, files in walk(extra_dir): for filename in files: filename = path.join(dirname, filename) if path.isfile(filename): extra_files.append(filename) app.config.update(TEMPLATES_AUTO_RELOAD=True) csrf.init_app(app) # ---------- PORT 80 App --------------------- # need sudo setcap 'cap_net_bind_service=+ep' /usr/bin/python3.7 app.run(extra_files=extra_files, port=80, host='0.0.0.0')
import os from views import app if __name__ == "__main__": host = os.environ.get('HOST') app.run(host=host)
#run.py from views import app app.run(debug=False)
from views import app app.run(host="0.0.0.0", port=5000)
# -*- coding: utf-8 -*- import fixpath from views import app app.run()
# project/run.py from views import app app.run(host='0.0.0.0', debug=True)
from views import app if __name__ == "__main__": # runs the application on the repl development server app.run(debug=True, host='127.0.0.1', port='5001')
#encoding: utf-8 from views import app if __name__ == '__main__': app.run(host='0.0.0.0', port=9004, debug=True)
# project/run.py import os from views import app port = int(os.environ.get('PORT', 5000)) app.run(host='0.0.0.0', port=port, debug=False)
import os from views import app app.debug = app.config['DEBUG'] if app.debug: app.run() else: port = int(os.environ.get('PORT', 5000)) app.run(host='0.0.0.0', port=port)
from views import app app.run(debug=True,host="0.0.0.0",port=88)
from views import app if __name__ == "__main__": app.run(debug=True, threaded=True, host='0.0.0.0')
from views import app if __name__ == '__main__': app.run(host="0.0.0.0")
from views import app app.run(debug=True, ssl_context=('./ssl.crt', './ssl.key'))
from views import app app.run("0.0.0.0", debug=True)
from views import * from config import * from views import app as application if __name__ == "__main__": application.run(host='0.0.0.0')
from views import app if __name__ == "__main__": app.run(host='0.0.0.0',debug=True)
#!venv/bin/python from views import app app.run(host="0.0.0.0",debug = True)
from views import app if __name__ == '__main__': app.run(debug=True, host='0.0.0.0', port=5000)
from views import app app.run(host="0.0.0.0",port=5000,debug=True)
from flask import Flask from views import app if __name__ == '__main__': app.run(threaded=True, )
#!/usr/bin/env python # # application.py -- A web server presenting a catalog of items # Author: Rudy Reeves from db import clear_database, create_category from views import app if __name__ == '__main__': clear_database() test_category_1 = create_category("Food") test_category_2 = create_category("Cars") app.secret_key = "lRYRXEimZGfbt3Q2TpD_6_Kj" app.debug = True app.run(host='0.0.0.0', port=8000)
from views import app if __name__ == '__main__': app.run(host='0.0.0.0')
from views import app app.run(host='0.0.0.0', debug=True, port=80)
from gevent import monkey monkey.patch_all() from views import app app.run(host='127.0.0.1', port=5000, debug=True)
import os import sys from views import app import views path = os.path.dirname(os.path.abspath(__file__)) if __name__ == "__main__": #views.setPort(int(sys.argv[1])) app.run(host='0.0.0.0', port=int(sys.argv[1]), threaded=True, use_reloader=False, debug=True)
# -*- coding:utf-8 -*- __author__ = 'liuxiaotong' from views import app if __name__ == '__main__': app.run(host='0.0.0.0', port=int(8848), threaded=True, debug=True)
from views import app if __name__ == "__main__": app.run(host='0.0.0.0', port=5000, debug=True)
from views import app app.run(debug=True, port=int('5001'))
def runserver(host=None, port=None): if host is not None and port is not None: app.run(host=host, port=int(port)) else: app.run()
def run(config): from views import app app.config['computer_id'] = config.computer_id app.config['DATABASE_URI'] = config.database_uri app.run(host=config.host, port=int(config.port), debug=True)
from views import app if __name__ == "__main__": app.run(host = "localhost",port=80,debug = True)
from views import app if __name__ == '__main__': app.run()
""" This script runs the CarProject application using a development server. """ from views import app DEBUG = False HOST = '0.0.0.0' SERVER_PORT = 8000 THREADED = True if __name__ == '__main__': app.run(HOST, port=SERVER_PORT, debug=DEBUG, threaded=THREADED)
from models import connect_to_db from views import app if __name__ == '__main__': app.run(debug=True, host="0.0.0.0") from flask import Flask app = Flask(__name__) connect_to_db(app) app.run() # took out from seed import & from models import extras
#!/Users/cjj/remoteServer/flask/bin/python #-*-coding:utf-8-*- from views import app app.run(host="0.0.0.0", debug = True)
#run.py #app.run() from views import app app.run(debug=True)
from views import app app.run(host="10.0.1.14", debug=True)