from flask import Flask, url_for
app = Flask(__name__)
@app.route("/hello/")
def first():
    return "안녕하세요"

@app.route("/hello/<int:age>")
def two(age):
    return "%d살이야." % age

if __name__ == "__main__":
    with app.test_request_context():    # Flask 객체을 통해 테스팅
        print(url_for('first'))
        print(url_for('two', age=22))
    #app.run(host="127.0.0.1", port="8080")
