Skip to content

Commit 3993589

Browse files
committed
Route '/ping' added.
1 parent bdb45da commit 3993589

File tree

3 files changed

+967
-5
lines changed

3 files changed

+967
-5
lines changed

main.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
def main():
2-
print("Hello from devops-engineer-from-scratch-project-313!")
1+
from typing import Union
32

3+
from fastapi import FastAPI
44

5-
if __name__ == "__main__":
6-
main()
5+
app = FastAPI()
6+
7+
8+
@app.get("/ping")
9+
def read_root():
10+
return "pong"

pyproject.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,11 @@ version = "0.1.0"
44
description = "Add your description here"
55
readme = "README.md"
66
requires-python = ">=3.11"
7-
dependencies = []
7+
dependencies = [
8+
"fastapi>=0.121.2",
9+
]
10+
11+
[dependency-groups]
12+
dev = [
13+
"fastapi[standard]>=0.121.2",
14+
]

0 commit comments

Comments
 (0)