Skip to content

Commit fed3c9d

Browse files
committed
Add function json
1 parent 1aa35ac commit fed3c9d

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

code/function/function.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"scriptFile": "function_app.py",
3+
"bindings": [
4+
{
5+
"authLevel": "anonymous",
6+
"type": "httpTrigger",
7+
"direction": "in",
8+
"name": "req",
9+
"methods": [
10+
"get",
11+
"post"
12+
],
13+
"route": "{*route}"
14+
},
15+
{
16+
"type": "http",
17+
"direction": "out",
18+
"name": "$return"
19+
}
20+
]
21+
}

code/function/function_app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ async def shutdown_event():
3434
)
3535

3636

37-
# async def main(req: func.HttpRequest, context: func.Context) -> func.HttpResponse:
38-
# return await func.AsgiMiddleware(fastapi_app).handle_async(req, context)
37+
async def main(req: func.HttpRequest, context: func.Context) -> func.HttpResponse:
38+
return await func.AsgiMiddleware(fastapi_app).handle_async(req, context)

0 commit comments

Comments
 (0)