@@ -84,17 +84,9 @@ public void warmup( @WarmupTrigger Object warmupContext, ExecutionContext contex
84
84
85
85
# [ Model v4] ( #tab/nodejs-v4 )
86
86
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:
88
88
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" :::
98
90
99
91
# [ Model v3] ( #tab/nodejs-v3 )
100
92
@@ -128,19 +120,10 @@ module.exports = async function (warmupContext, context) {
128
120
::: zone pivot="programming-language-typescript"
129
121
# [ Model v4] ( #tab/nodejs-v4 )
130
122
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.
135
124
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" :::
139
126
140
- app .warmup (' warmup' , {
141
- handler: warmupFunction ,
142
- });
143
- ```
144
127
145
128
# [ Model v3] ( #tab/nodejs-v3 )
146
129
TypeScript samples aren't documented for model v3.
0 commit comments