Flask app : The requested URL was not found on the server
<p>Why doesn't my add function work?</p>

<pre><code>from flask import Flask
from flask import request
app = Flask(__name__)
@app.route('/')
@app.route('/&lt;name&gt;')
def index(name="Mona"):
    #name= request.args.get('name', name)
    return "Hello from {}".format(name)
@app.route('/add/num1/num2')
def add(num1, num2):
    return '{} + {} = {}'.format(num1, num2, num1 + num2)
app.run(debug=True, port=8002, host='0.0.0.0')
</code></pre>

<p>I get this error when I browse to <code>0.0.0.0:8002/add/1/4</code></p>

<pre><code>Not Found

The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
</code></pre>