© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
Global ContextHolder - Cloudflare Developers
CD
Cloudflare Developers
•
2y ago
•
2 replies
Marcel Overdijk
Global ContextHolder
I
'm using Hono on cloudflare workers and my handle functions look like
:
async handle(ctx: Context<Env>) { .. }
async handle(ctx: Context<Env>) { .. }
and I
'm then passing that
ctx
ctx
that to other method calls in multiple layers
.
which feels quite cumbersome
.
is it possible to create some global
ContextHolder
ContextHolder
where I can set and get the
ctx
ctx
from
? Like a request
-scoped holder
.
.
.
I wonder how others do this
?
Cloudflare Developers
Join
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
87,353
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Recent Announcements
Similar Threads
Global vars
CD
Cloudflare Developers / workers-and-pages-help
3y ago
Global in Workers?
CD
Cloudflare Developers / workers-and-pages-help
4y ago
Workers are not global
CD
Cloudflare Developers / workers-and-pages-help
10mo ago
Disallowed operation called within global scope...
CD
Cloudflare Developers / workers-and-pages-help
14mo ago