'Setting the route of a web application

What i'm trying to do is a web application using Flask and waitress and i have a problem when i try to set the route, the code that does not run is the following:

app=Flask(__name__)

#Set the route
# http://localhost:8000/
@app.route("/", methods=['GET']) #This is the line which i get the error

and the error that is print in terminasl is as follows:

... 
  File "<stdin>", line 2

    ^
SyntaxError: invalid syntax

Note: in line 2 there is no code

Thanks



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source