Skip to content

Commit 05243d0

Browse files
Marie HoegerMarie Hoeger
authored andcommitted
adding some comments
1 parent 827eb37 commit 05243d0

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,7 @@ The next step is to inlude function.json generation scripts in this project as w
88
- npm install
99
- npm start
1010

11+
Check out app.ts code
12+
1113
### Disclaimer
1214
I wanted to show that code in `common` and `functions` can be structured however you like. Worth thinking about what pattern we actually want to encourage, especially with how we want to do templates.

src/functions/goodbye.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { AzureFunction, Context } from "@azure/functions"
22
import { Function2, HttpTrigger, BlobInput } from "../../future_node_modules/functions/azure-functions"
33
import { CookiedRequest } from "../common/interfaces"
44

5+
// More traditional look of an Azure Function + registering by creating a "Function2" object
56
const farewell: AzureFunction = async function (context: Context): Promise<void> {
67
// Log info from request cookie
78
const req = context.req as CookiedRequest;

src/functions/hello.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Function2, HttpTrigger, BlobInput } from "../../future_node_modules/fun
22
import { NamedContext } from "../common/interfaces"
33
import { createResponse } from "../common/talkToPerson"
44

5+
// Newer look of an Azure Function. Note that it may be dangerous to not call "context.done" or forget to declare async
56
export const helloFunction = new Function2(new HttpTrigger("api/hi", ["GET"]))
67
.bindInputs([
78
new BlobInput("blobInput")

0 commit comments

Comments
 (0)