mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Add hello world cf function
This commit is contained in:
parent
3ed60c1d7c
commit
10e1679529
1 changed files with 13 additions and 0 deletions
13
functions/hello-world.js
Normal file
13
functions/hello-world.js
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
export async function onRequest(context) {
|
||||
// Contents of context object
|
||||
const {
|
||||
request, // same as existing Worker API
|
||||
env, // same as existing Worker API
|
||||
params, // if filename includes [id] or [[path]]
|
||||
waitUntil, // same as ctx.waitUntil in existing Worker API
|
||||
next, // used for middleware or to fetch assets
|
||||
data, // arbitrary space for passing data between middlewares
|
||||
} = context;
|
||||
|
||||
return new Response('Hello, worker!')
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue