Esempio n. 1
0
from manager import app
app.run(host="127.0.0.1", port=5000, debug=True)
Esempio n. 2
0
#!/usr/bin/env python
from manager import app
app.run(host="0.0.0.0", port=8181, debug=True)
Esempio n. 3
0
# coding=utf8
# Author: quheng

from manager import app

if __name__ == "__main__":
    app.run(debug=False)
Esempio n. 4
0
            'msg': 'user not existed',
            'data': ''
        }
    }

    if all([username, password]):
        user = User.query.filter_by(nickname=username).first()
        if user:
            if user.check_password(password):
                rtn_status = status['0']
                rtn_status['data'] = user.to_dict()
                return jsonify(rtn_status)
            return jsonify(status['-2'])
        return jsonify(status['-3'])

    elif all([mobile, password]):
        user = User.query.filter_by(mobile=mobile).first()
        if user:
            if user.check_password(password):
                rtn_status = status['0']
                rtn_status['data'] = user.to_dict()
                return jsonify(rtn_status)
            return jsonify(status['-2'])
        return jsonify(status['-3'])
    else:
        return jsonify()


if __name__ == "__main__":
    app.run()
Esempio n. 5
0
# -*- coding:utf-8 -*-
from manager import app

app = app

if __name__ == "__main__":
    app.run(host="0.0.0.0", port=80)
Esempio n. 6
0
#!manager/flask/bin/python
from manager import app
app.run(host='0.0.0.0',debug=True)
Esempio n. 7
0
# coding=utf8
# Author: quheng

from manager import app


if __name__ == "__main__":
    app.run(debug = False)
Esempio n. 8
0
def runserver():
    port = int(os.environ.get('PORT', 5000))
    app.run(host='127.0.0.1', port=port)
Esempio n. 9
0
from manager import app
from manager import monitor_pool

import threading

if __name__ == '__main__':

    monitor_process = threading.Thread(target=monitor_pool.background_monitor)
    monitor_process.start()
    app.run(host='0.0.0.0', threaded=True)
Esempio n. 10
0
from manager import app
import a2
# import a5
app.run(host="127.0.0.1", port=5000, debug = True)
Esempio n. 11
0
from manager import app
import sys, threading
from manager import rabbitmq
app.debug = True
app.secret_key = 'super secret developmentkey, not at all posted on github.'
port = 80
if app.debug:
    try:
        port = int(sys.argv[1])
    except IndexError:
        port = 8000
try:
    file_sync_thread = threading.Thread(target=rabbitmq.rec_update)
    file_sync_thread.setDaemon(True)
    file_sync_thread.start()
except (KeyboardInterrupt, SystemExit):
    print 'Stopped thread'
app.run(host='0.0.0.0', port=port, use_reloader=False)
Esempio n. 12
0
from manager import app
import sys, threading
from manager import rabbitmq
app.debug = True
app.secret_key = 'super secret developmentkey, not at all posted on github.'
port = 80
if app.debug:
    try:
        port = int(sys.argv[1])
    except IndexError:
        port = 8000
try:
    file_sync_thread=threading.Thread(target=rabbitmq.rec_update)
    file_sync_thread.setDaemon(True)
    file_sync_thread.start()
except (KeyboardInterrupt, SystemExit):
    print 'Stopped thread'
app.run(host = '0.0.0.0', port=port, use_reloader=False)
Esempio n. 13
0
from manager import app

if __name__ == "__main__":
    app.run(debug=True)
Esempio n. 14
0
from manager import app as application

if __name__ == "__main__":
    application.run()
Esempio n. 15
0
    return data.content


@app.route("/cluster")
def cluster():
    return render_template('cluster.html')

@app.route("/error")
def error():
    return render_template('error.html')


@app.route("/teste")
def teste():
    return render_template('teste.html')

@app.errorhandler(404)
def page_not_found(error):
    return render_template('error.html'),404


def hash_password(password):
    return pbkdf2_sha256.encrypt(password, rounds=25600)


def verify_password(password, hash):
    return pbkdf2_sha256.verify(password, hash)


app.run(host='0.0.0.0', port=5000)