Create viewCounter.js
This commit is contained in:
parent
723293a103
commit
cc40d11020
1 changed files with 11 additions and 0 deletions
11
netlify/functions/viewCounter.js
Normal file
11
netlify/functions/viewCounter.js
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
let count = 0;
|
||||
|
||||
exports.handler = async function(event, context) {
|
||||
count += 1;
|
||||
|
||||
return {
|
||||
statusCode: 200,
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ count })
|
||||
};
|
||||
};
|
||||
Loading…
Reference in a new issue