diff --git a/netlify/functions/viewCounter.js b/netlify/functions/viewCounter.js new file mode 100644 index 0000000..c12a7a8 --- /dev/null +++ b/netlify/functions/viewCounter.js @@ -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 }) + }; +};