forked from iam-veeramalla/aws-devops-zero-to-hero
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dd61782
commit 9851279
Showing
1 changed file
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |