Challenge - 5 Problems
Deno Deploy Edge Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediateWhat is a key feature of Deno Deploy that supports edge computing?
Which feature of Deno Deploy allows it to run code closer to users, reducing latency?
Attempts:
2 left
💡 Hint
Think about how edge computing reduces delay by running code near users.
✗ Incorrect
Deno Deploy automatically distributes your code to many edge locations worldwide, so requests are handled close to users, reducing latency.
❓ component_behavior
intermediateHow does Deno Deploy handle incoming requests to enable edge computing?
When a user sends a request, how does Deno Deploy process it to ensure low latency?
Attempts:
2 left
💡 Hint
Consider how edge servers reduce travel time for data.
✗ Incorrect
Deno Deploy routes requests to the closest edge server, so your code runs near the user, lowering response time.
❓ lifecycle
advancedWhat happens when you update your code in Deno Deploy regarding edge computing?
After deploying a new version of your code, how does Deno Deploy ensure the update is available globally at the edge?
Attempts:
2 left
💡 Hint
Think about how edge computing platforms keep code consistent everywhere.
✗ Incorrect
Deno Deploy automatically and instantly distributes your updated code to all edge servers, ensuring users everywhere get the latest version.
📝 Syntax
advancedWhich Deno Deploy code snippet correctly handles an HTTP request at the edge?
Select the code snippet that properly responds to an HTTP request in Deno Deploy's edge environment.
Attempts:
2 left
💡 Hint
Look for the standard event listener pattern for fetch events in Deno Deploy.
✗ Incorrect
Deno Deploy uses the 'fetch' event listener to handle HTTP requests at the edge. Option A correctly uses addEventListener with event.respondWith.
🔧 Debug
expertWhy does this Deno Deploy edge function fail to respond correctly?
Given this code snippet, why does the function not send a response to the user?
```js
addEventListener('fetch', event => {
new Response('Hello from edge!')
})
```
Deno
addEventListener('fetch', event => { new Response('Hello from edge!') })
Attempts:
2 left
💡 Hint
Check how the response is linked to the event to send it back.
✗ Incorrect
In Deno Deploy, you must call event.respondWith() with the Response object to send it. Just creating a Response does nothing.
