Skip to content

docs: document deno serve default export shape#3042

Merged
bartlomieju merged 1 commit intomainfrom
docs/serve-default-export
Apr 8, 2026
Merged

docs: document deno serve default export shape#3042
bartlomieju merged 1 commit intomainfrom
docs/serve-default-export

Conversation

@bartlomieju
Copy link
Copy Markdown
Member

Summary

  • Adds a "Default export shape" section to the deno serve reference page
  • Documents the Deno.ServeDefaultExport interface with its two properties:
    • fetch (required) — handler signature, ServeHandlerInfo with remoteAddr and completed, error behavior
    • onListen (optional) — callback with Deno.Addr, default logging behavior
  • Documents validation behavior (missing fetch, non-function values)
  • Includes a complete example using both properties

Test plan

  • Verify the new section renders correctly
  • Verify code examples display properly

🤖 Generated with Claude Code

Adds a section explaining the ServeDefaultExport interface, including
the required fetch handler (with ServeHandlerInfo), the optional
onListen callback, and error/validation behavior.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bartlomieju bartlomieju merged commit 2ff0019 into main Apr 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant