Skip to content

Commit d1ffa62

Browse files
kk-minypwong99
authored andcommitted
Add hellonode raw-code for Azure
1 parent 42b4c52 commit d1ffa62

File tree

1 file changed

+23
-0
lines changed
  • src/setup/deployment/raw-code/serverless/azure/hellonode

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
async function handler(context, request) {
2+
let q = request.query;
3+
let incrementLimit = 0;
4+
if (q.incrementLimit) {
5+
incrementLimit = parseInt(q.incrementLimit);
6+
}
7+
8+
simulateWork(incrementLimit);
9+
10+
context.res = {
11+
status: 200,
12+
body: {
13+
RequestID: context.invocationId,
14+
TimestampChain: [Date.now().toString()],
15+
}
16+
};
17+
};
18+
19+
const simulateWork = (incrementLimit) => {
20+
for (let i = 0; i < incrementLimit; i++) { }
21+
};
22+
23+
module.exports = handler

0 commit comments

Comments
 (0)