From 459fabf119117c2d204ea5e8f17b05a713f4514e Mon Sep 17 00:00:00 2001 From: Alex Date: Sun, 23 Mar 2025 09:24:23 +0000 Subject: docs: add JSDoc comment for fetch event handler --- source/index.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source') diff --git a/source/index.js b/source/index.js index 5f6340b..e11aeac 100644 --- a/source/index.js +++ b/source/index.js @@ -1,6 +1,16 @@ import talent96 from "./data/talent96.js"; export default { + /* + Fetch event handler, this function will be called whenever a request is made to the worker. + The function will parse the request and return a response based on the request path. + + @param {Request} request - the incoming request object + @param {Environment} environment - the environment object + @param {Context} context - the context object + + @returns {Response} a new Response object + */ async fetch(request, environment, context) { const url = new URL(request.url); -- cgit v1.2.3