Пример #1
0
#!/usr/bin/env python
from demo import app


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

Пример #2
0
from demo import app

if __name__ == "__main__":
    app.run(host='0.0.0.0', port=8000, debug=True)
Пример #3
0
def runserver(config=None):
    app.run()
Пример #4
0
#!/usr/bin/env python
import sys
sys.path.append('/var/www/lib')
from demo import app

if __name__ == "__main__":
    app.debug = True

    app.run(host='0.0.0.0', port=5003)
Пример #5
0
'''
from app import app


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

from demo import app

app.debug=True
if __name__=='__main__':
    app.run()
Пример #6
0
import os

from demo import app

app.config['DEBUG'] = os.environ.get('FLASK_DEBUG', True)
host = os.environ.get('FLASK_HOST', '0.0.0.0')
port = os.environ.get('FLASK_PORT', 5000)

if __name__ == "__main__":
    app.run(host=host, port=port)
Пример #7
0
def main(req, res):
    app.run(req, res)
Пример #8
0
from demo import app

if __name__ == '__main__':
    app.run('www.xyz.com', port=80)
Пример #9
0
"""
This script runs the myFlask application using a development server.
"""

from os import environ
from demo import app

if __name__ == '__main__':
    HOST = environ.get('SERVER_HOST', '0.0.0.0')
    try:
        PORT = int(environ.get('SERVER_PORT', '80'))
    except ValueError:
        PORT = 5555
    app.run(HOST, PORT, debug=True)
Пример #10
0
from demo import app
import os

port = int(os.environ.get("PORT", 5000))
app.run(host='0.0.0.0', port=port)
Пример #11
0
#!flask/bin/python

# Flask/MondoDB/GraphAPI demo app
# Author: Joseph Edwards VIII
# Date: 04/23/2014

if __name__ == '__main__':
    from demo import app
    app.run(debug = True)

Пример #12
0
from demo import app
app.run(host='0.0.0.0')
from demo import app

if __name__ == '__main__':
    app.run(debug=True, use_reloader=True)
Пример #14
0
import sys

from demo import app

app.run("127.0.0.1", 80, debug=True)
Пример #15
0
            "name": name,
            "donGia": donGia,
            "quantity": 1
        }
    session['book_cart'] = book_cart
    quan = util_pay.book_cart_stats(book_cart)

    return jsonify({
        "total_quantity": quan
    })

@app.route('/api/submit-buybook', methods=['post'])
@decorator.login_required
def submit_buybook():
    if util_pay.add_book(session.get('book_cart')):
        del session['book_cart']

        return jsonify({
            "message": "Add receipt successful!",
            "err_code": 200
        })

    return jsonify({
        "message": "Failed"
    })


if __name__ =="__main__":

    app.run(debug=True)
Пример #16
0
from demo import app, db, manager
from models import Player
from flask import render_template
from flask.ext.babel import gettext as _


db.create_all()
manager.create_api(Player, methods=["GET", "POST", "DELETE"])


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


if __name__ == "__main__":
    app.run()
Пример #17
0
import os
from demo import app


if __name__ == '__main__':
    app.run(host="localhost", port=5009)
Пример #18
0
from demo import app

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