from flask import Flask

app = Flask(__name__, static_folder='.', static_url_path='')


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


@app.route('/fac/<n>')
def factorial(n):
    total = 1
    print(type(n))
    m = int(n)
    for i in range(m):
        total = total*(i+1)
    return total


@app.route('/echo/<thing>')
def echo(thing):
    return "Say hello to my little friend: %s" % thing

app.run(port=9999, debug=True)
