예제 #1
0
from rest_api import app


if __name__ == '__main__':
	app.run(debug=True)
# -*- coding: utf-8 -*-
""" REST API - WSGI entry point

    Author(s): Adam Mitchell, [email protected]
"""

from rest_api import app

if __name__ == "__main__":
    app.run(host='0.0.0.0', port=80, debug=True)
예제 #3
0
파일: app.py 프로젝트: shawnyang610/YouDMC
from rest_api import app
import sys

if __name__ == '__main__':
    sys.setdefaultencoding('utf-8')
    app.run(port=5000, debug=True)
예제 #4
0
from rest_api import app

app.run(host="0.0.0.0", port=8080)




예제 #5
0
파일: run.py 프로젝트: fuentesj/easy-key-z
from rest_api import app

if __name__ == "__main__":
    app.run()
예제 #6
0
        token = request.args.get('token')

    print token

    if token is not None:
        username,password = token.split(":") # naive token
        user_entry = User.get(username)
        if (user_entry is not None):
            user = User(user_entry[0],user_entry[1])
            if (user.password == password):
                return user
    return None


@app.route("/",methods=["GET", "ORIGIN"])
@cross_origin()
def index():
    return Response(response="Hello World!",status=200)


@app.route("/protected/",methods=["GET", "ORIGIN"])
@cross_origin()
@login_required
def protected():
    return Response(response="Hello Protected World!", status=200)


if __name__ == '__main__':
    app.config["SECRET_KEY"] = "ITSASECRET"
    app.run(port=5000,debug=True)
예제 #7
0
from rest_api import app
from rest_api_config import config

if __name__ == "__main__":
    app.run(host=config.CONFIG_HTTP_HOST,
            port=config.CONFIG_HTTP_PORT,
            threaded=True,
            debug=False)