Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from fastapi import FastAPI
from fastapi import FastAPI
from datetime import datetime

app = FastAPI()

Expand All @@ -11,3 +12,8 @@ async def root():
@app.get("/hello/{name}")
async def say_hello(name: str):
return {"message": f"Hello {name}"}


@app.get("/time")
async def get_time():
return {"time": datetime.now().isoformat()}