Esempio n. 1
0
def main(args):
    try:
        urls = read_csv(args.file)
        with open(args.requirement, 'r') as conf_file:
            requirement = conf_file.read().strip()

        periodic_run(start_making_requests, args.delay, urls, requirement)()
        if args.port:
            if args.flask:
                app.run(port=args.port)
            else:
                runserver(args.port)
        else:
            if args.flask:
                app.run()
            else:
                runserver(5000)
    except IOError as e:
        print("Error occured: {}".format(e.with_traceback))
    finally:
        sys.exit(1)
Esempio n. 2
0
from flask_server import app

app.run(host='0.0.0.0', port='80', debug=True)
Esempio n. 3
0
from flask_server import app
if __name__ == "__main__":
    app.run(debug=True)
# system
import os
from flask_server import app

# Initialisation
import backend

# initialise tests
from tests import RunAllTests
#RunAllTests()


from tests import quick_cosplay_led_test as qt
qt.endless_test()

# Initialise flask_server
# app.run(host='0.0.0.0', port='5000', debug=True)
if __name__ == "__main__":
    print("run main")
    app.run(host='0.0.0.0', port='5000', debug=False)


Esempio n. 5
0
 def run_server():
     app.run(host='127.0.0.1', port=self.PORT)
Esempio n. 6
0
# -*- coding: utf-8 -*-
# @Author: Shuang0420
# @Date:   2017-07-12 11:47:28
# @Last Modified by:   Shuang0420
# @Last Modified time: 2017-07-14 19:21:37

# from gevent.monkey import patch_all
# patch_all()
from flask_server import app
from flask_server.config import *

if __name__ == '__main__':
    if LOCAL_TEST:
        app.run(debug=True, host='0.0.0.0', port=5000)
    else:
        app.run(debug=True, host='0.0.0.0', port=8080)
Esempio n. 7
0
from flask_server import app

if __name__ == '__main__':
    app.run(port=8888)
Esempio n. 8
0
from flask_server import app

if __name__ == '__main__':
    app.run(debug=False, host='0.0.0.0')
Esempio n. 9
0
from flask import request, send_from_directory, render_template, redirect
from flask_mongoengine.wtf import model_form
from flask.ext.wtf import Form

from flask_server import app
from db.db_backup import *

from db.mongo_models import CameraInput, MeterSettings, MeterImageSettings, KNNSettings
from db.mongo_db_manager import MongoDataBaseManager as db
from run.raspimeter import Raspimeter
import assets
from basic_auth import *


if __name__ == '__main__':
    app.run()
    
@app.route("/")
@requires_auth
def index():
    '''
    '''
    if app.config["MONGODB_SETTINGS"]['DB'] == '':
        return redirect("/settings", code=302)
    
    meters = []
    
    for meter in db.getMeters():
        meters.append(meter)
        
    return render_template('charts.html', meters=meters, show_charts=True)
Esempio n. 10
0
from flask_server import app as application

if __name__ == "__main__":
	application.run()

Esempio n. 11
0
import flask_server
from flask_server import app

if __name__ == "__main__":
    app.run('0.0.0.0', debug=True)
Esempio n. 12
0
from flask_server import app
# from flaskr import app

# app.run(host='0.0.0.0')  # 127.0.0.1 == localhost

# from flaskr import create_app
# from flaskr.db import init_db

# app = create_app()
app.run(host='0.0.0.0', debug=True, port=8080)
Esempio n. 13
0
#!/usr/bin/env python3
from flask_server import app

if __name__ == '__main__':
    app.run(host="localhost", port=5000)
Esempio n. 14
0
from flask_server import app

if __name__ == "__main__":
    app.run(port=5000, debug=False)
Esempio n. 15
0
from flask_server import app
from sys import argv, exit


def checkDebug():
    debugTrue = "debug=true"
    debugFalse = "debug=false"

    if len(argv) != 2:
        printUsage()

    arg = argv[1]
    if arg.lower() == debugTrue:
        return True
    elif arg.lower() == debugFalse:
        return False
    else:
        printUsage()


def printUsage():
    print("Error: first argument must contain 'debug=true' or 'debug=false'")
    exit()


if __name__ == '__main__':
    debug = checkDebug()
    app.run(debug=debug)
Esempio n. 16
0
# from werkzeug.middleware.dispatcher import DispatcherMiddleware
from spyne.server.wsgi import WsgiApplication

import soap_service
from flask_server import app


# app.wsgi_app = DispatcherMiddleware(app.wsgi_app, {
#     '/soap': WsgiApplication(soap_service.create_app(app))
# })


if __name__ == '__main__':
    app.run()
Esempio n. 17
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from flask_server import app
import config


if __name__ == "__main__":
    app.run(host='0.0.0.0', port=config.PORT)