aboutsummaryrefslogtreecommitdiff
path: root/source/index.js
diff options
context:
space:
mode:
authorAlex <zuedev@gmail.com>2025-03-23 09:24:23 +0000
committerAlex <zuedev@gmail.com>2025-03-23 09:24:23 +0000
commit459fabf119117c2d204ea5e8f17b05a713f4514e (patch)
tree2a737a01d0caf2cdd83a3dcf9386441e9cc82203 /source/index.js
parentd6837fa47782061b407ca6b794dece09f1422805 (diff)
downloadzue.dev-459fabf119117c2d204ea5e8f17b05a713f4514e.tar
zue.dev-459fabf119117c2d204ea5e8f17b05a713f4514e.tar.gz
zue.dev-459fabf119117c2d204ea5e8f17b05a713f4514e.tar.bz2
zue.dev-459fabf119117c2d204ea5e8f17b05a713f4514e.tar.xz
zue.dev-459fabf119117c2d204ea5e8f17b05a713f4514e.zip
docs: add JSDoc comment for fetch event handler
Diffstat (limited to 'source/index.js')
-rw-r--r--source/index.js10
1 files changed, 10 insertions, 0 deletions
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);