Skip to content

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Jul 2, 2025

This PR exposes h3.app? (optional)

This allows:

Concerns: Exposing a global app instance might allow side effects from handlers, which makes the global app unpredictable. We likely need to freeze routes and config at least after serve method (upcoming PR)

@codecov
Copy link

codecov bot commented Jul 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@pi0 pi0 merged commit 97a65f2 into main Jul 2, 2025
5 checks passed
@pi0 pi0 deleted the feat/event-app branch July 2, 2025 09:06
@huseeiin
Copy link
Contributor

huseeiin commented Jul 8, 2025

may i ask why is it optional?

@pi0
Copy link
Member Author

pi0 commented Jul 8, 2025

@huseeiin because with new H3Event() (for testing and mock, and defineHandler().fetch) there no app instance attached to it.

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.

H3Event.fetch Allow access h3 app from events

2 participants