© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
Initialize worker - Cloudflare Developers
CD
Cloudflare Developers
•
3y ago
•
1 reply
kika
Initialize worker
Hi
, is there an idiomatic way to initialize worker outside of the
fetch()
fetch()
? I want to try the new
connect()
connect()
to connect to the database
, but I don
't want to do that repeatedly for every request that
fetch()
fetch()
may handle
. Is there something better than global variable and a mutex
?
Cloudflare Developers
Join
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
86,801
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Recent Announcements
Similar Threads
My products Worker KV wont initialize
CD
Cloudflare Developers / workers-and-pages-help
5mo ago
Workern to worker fetch 1042
CD
Cloudflare Developers / workers-and-pages-help
4mo ago
Worker Build failed to initialize and was timed out
CD
Cloudflare Developers / workers-and-pages-help
5mo ago
How can I make requests to my RPC WorkerEntrypoint worker.
CD
Cloudflare Developers / workers-and-pages-help
10mo ago