Skip to content

Commit

Permalink
update routes
Browse files Browse the repository at this point in the history
  • Loading branch information
ramprasathmk committed Dec 9, 2024
1 parent f3faedb commit beb39cd
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,24 @@
app = Flask(__name__)


@app.route('/')
def return_hello():
return f"""
<center><h1> Welcome </h1></center>
<br/>
<h3>Greetings</h3>
"""


@app.route('/<name>')
def return_hello_with_name(name: str = "Ramprasath M K"):
return f"""
<center><h1> Welcome </h1></center>
<br/>
<h3>Hi, {name}</h3>
"""


@app.route('/<random_string>')
def return_backwards_string(random_string):
return "".join(reversed(random_string))
Expand Down

0 comments on commit beb39cd

Please sign in to comment.