diff --git a/main.py b/main.py index 761173c..1b12172 100644 --- a/main.py +++ b/main.py @@ -1,4 +1,5 @@ -from fastapi import FastAPI +from fastapi import FastAPI +from datetime import datetime app = FastAPI() @@ -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()}