mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Add demo worker
This commit is contained in:
parent
63589a079a
commit
a4186bafdf
10 changed files with 348 additions and 0 deletions
13
doesitarm-default/index.js
Normal file
13
doesitarm-default/index.js
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
addEventListener('fetch', event => {
|
||||
event.respondWith(handleRequest(event.request))
|
||||
})
|
||||
|
||||
/**
|
||||
* Respond with hello worker text
|
||||
* @param {Request} request
|
||||
*/
|
||||
async function handleRequest(request) {
|
||||
return new Response('Hello worker!', {
|
||||
headers: { 'content-type': 'text/plain' },
|
||||
})
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue