Example #1
0
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)
Example #2
0
from views import app
if __name__ == '__main__':
    app.run(host="0.0.0.0", port=8001, debug=True)
Example #3
0
def main():
    app.debug = True
    #toolbar = DebugToolbarExtension(app)
    app.run(host='0.0.0.0', port=8000)
Example #4
0
def main():
    create_tables()
    app.run(host='0.0.0.0', port=8080, debug=True)
Example #5
0
#!/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)
Example #6
0
# 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)
    '''
Example #7
0
from views import app

if __name__ == "__main__":
    app.run(debug=True, port=9090)
Example #8
0
"""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)
Example #9
0
#encoding: utf-8

from views import app

if __name__ == '__main__':
    app.run(host='0.0.0.0', port=8888, debug=True)
Example #10
0
from views import app
import os

PORT = int(os.getenv('PORT', 8080))
app.run(debug=True, port=PORT)
Example #11
0
  # 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..')
Example #12
0
import os
from views import app

port = int(os.environ.get('PORT', 5000))
app.run(debug=False, host='0.0.0.0', port=port)
Example #13
0
# coding:utf-8

from views import app

if __name__ == '__main__':
	app.run(debug=True,port=9090)
Example #14
0
import os
from flaskext.markdown import Markdown
from views import app

Markdown(app)

if __name__ == '__main__':
    app.run(host="0.0.0.0")
Example #15
0
# run.py

from views import app
app.run(debug=False)
Example #16
0
def ghz():
    app.run(fl, port = 4448, host = '0.0.0.0')
Example #17
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
Example #18
0
def main():
    ssl(app)
    db.init_app(app)
    app.run(ssl_context = ctx, host='0.0.0.0', port=8082)    
Example #19
0
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'
Example #20
0
# project/run.py


from views import app
app.run(debug=True, host='0.0.0.0')
Example #21
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')


Example #22
0
import os

from views import app

if __name__ == "__main__":
    host = os.environ.get('HOST')
    app.run(host=host)
Example #23
0
#run.py

from views import app
app.run(debug=False)
Example #24
0
from views import app
app.run(host="0.0.0.0", port=5000)
Example #25
0
# -*- coding: utf-8 -*-

import fixpath
from views import app
app.run()
Example #26
0
# project/run.py


from views import app


app.run(host='0.0.0.0', debug=True)
Example #27
0
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')
Example #28
0
#encoding: utf-8

from views import app

if __name__ == '__main__':
    app.run(host='0.0.0.0', port=9004, debug=True)
Example #29
0
# 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)
Example #30
0
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)
Example #31
0
from views import app
app.run(debug=True,host="0.0.0.0",port=88)
Example #32
0
from views import app

if __name__ == "__main__":
    app.run(debug=True, threaded=True, host='0.0.0.0')
Example #33
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'))
Example #35
0
from views import app

app.run("0.0.0.0", debug=True)
Example #36
0
from views import *
from config import *
from views import app as application

if __name__ == "__main__":
    application.run(host='0.0.0.0')
Example #37
0
from views import app
if __name__ == "__main__":
    app.run(host='0.0.0.0',debug=True)
Example #38
0
#!venv/bin/python
from views import app
app.run(host="0.0.0.0",debug = True)
Example #39
0
from views import app

if __name__ == '__main__':
    app.run(debug=True, host='0.0.0.0', port=5000)
Example #40
0
from views import app

app.run(host="0.0.0.0",port=5000,debug=True)
Example #41
0
from flask import Flask
from views import app

if __name__ == '__main__':
    app.run(threaded=True, )
Example #42
0
#!/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)
Example #43
0
File: run.py Project: RedCater/RR
from views import app

if __name__ == '__main__':
    app.run(host='0.0.0.0')


Example #44
0
from views import app

app.run(host='0.0.0.0', debug=True, port=80)
Example #45
0
from gevent import monkey
monkey.patch_all()

from views import app
app.run(host='127.0.0.1', port=5000, debug=True)
Example #46
0
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)
Example #47
0
# -*- 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)
Example #48
0
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'))
Example #50
0
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()
Example #51
0
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)
Example #52
0
from views import app

if __name__ == "__main__":
    app.run(host = "localhost",port=80,debug = True)


Example #53
0
from views import app
if __name__ == '__main__':
    app.run()
Example #54
0
"""
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)
Example #55
0
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
Example #56
0
#!/Users/cjj/remoteServer/flask/bin/python
#-*-coding:utf-8-*-


from views import app
app.run(host="0.0.0.0", debug = True)
Example #57
0
#run.py
#app.run()
from views import app
app.run(debug=True)
Example #58
0
from views import app

app.run(host="10.0.1.14", debug=True)