Skip to content

Commit

Permalink
Create app.py
Browse files Browse the repository at this point in the history
  • Loading branch information
iam-veeramalla authored Aug 1, 2023
1 parent dd61782 commit 9851279
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions day-21/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# app.py

from flask import Flask

app = Flask(__name__)

# Route to the root URL
@app.route('/')
def hello():
return 'Hello, Flask on Docker!'

# Route to a custom endpoint
@app.route('/greet/<name>')
def greet(name):
return f'Hello, {name}! Welcome to Flask on Docker.'

if __name__ == '__main__':
app.run(host='0.0.0.0', port=3000)

0 comments on commit 9851279

Please sign in to comment.