Skip to content

Commit 7b32067

Browse files
committed
Move code samples to nodejs-samples repo
1 parent 8a7c66d commit 7b32067

File tree

1 file changed

+4
-21
lines changed

1 file changed

+4
-21
lines changed

articles/azure-functions/functions-bindings-warmup.md

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,9 @@ public void warmup( @WarmupTrigger Object warmupContext, ExecutionContext contex
8484

8585
# [Model v4](#tab/nodejs-v4)
8686

87-
The following example shows a warmup trigger [JavaScript function](functions-reference-node.md) that runs on each new instance when added to your app.
87+
The following example shows a warmup trigger [JavaScript function](functions-reference-node.md) that runs on each new instance when added to your app:
8888

89-
```javascript
90-
import { app } from "@azure/functions";
91-
92-
app.warmup('warmupTrigger1', {
93-
handler: (warmupContext, context) => {
94-
context.log('Function App instance is warm.');
95-
},
96-
});
97-
```
89+
:::code language="javascript" source="~/azure-functions-nodejs-v4/js/src/functions/warmupTrigger1.js" :::
9890

9991
# [Model v3](#tab/nodejs-v3)
10092

@@ -128,19 +120,10 @@ module.exports = async function (warmupContext, context) {
128120
::: zone pivot="programming-language-typescript"
129121
# [Model v4](#tab/nodejs-v4)
130122

131-
The following example shows a warmup trigger [JavaScript function](functions-reference-node.md) that runs on each new instance when added to your app.
132-
133-
```TypeScript
134-
import { app, InvocationContext, WarmupContextOptions } from "@azure/functions";
123+
The following example shows a warmup trigger [TypeScript function](functions-reference-node.md) that runs on each new instance when added to your app.
135124

136-
export async function warmupFunction(warmupContext: WarmupContextOptions, context: InvocationContext): Promise<void> {
137-
context.log('Function App instance is warm.');
138-
}
125+
:::code language="typescript" source="~/azure-functions-nodejs-v4/ts/src/functions/warmupTrigger1.ts" :::
139126

140-
app.warmup('warmup', {
141-
handler: warmupFunction,
142-
});
143-
```
144127

145128
# [Model v3](#tab/nodejs-v3)
146129
TypeScript samples aren't documented for model v3.

0 commit comments

Comments
 (0)