Add helloworld.py and update serve method in api.py

This commit is contained in:
2024-03-30 20:11:42 -04:00
parent bf43d9f202
commit 555e9bff65
2 changed files with 14 additions and 5 deletions
+12
View File
@@ -0,0 +1,12 @@
import responder
api = responder.API()
@api.route("/{greeting}")
async def greet_world(req, resp, *, greeting):
resp.text = f"{greeting}, world!"
if __name__ == "__main__":
api.run()