Deployment suggestion
Due to certain reasons, I am unable to deploy the worker on
Cloudflare
. Therefore, I have to deploy it on my own server.
Currently, I am using wrangler dev
for deployment, but it reloads the code and supports only single-threaded execution.
To better deploy on my own server, I need a more optimized solution. Could you please provide some suggestions? Thank you!10 Replies
but
miniflare@3
no longer includes a CLI.I'd setup workerd directly, it's going to be more complex but would result in a more stable solution
GitHub
GitHub - cloudflare/workerd: The JavaScript / Wasm runtime that pow...
The JavaScript / Wasm runtime that powers Cloudflare Workers - cloudflare/workerd
Thank you very much for your help!
How does Wokerd load environment configurations, such as the [[d1_databases]] for the d1 database?
If this is a long-term limitation, I would explore not tying yourself to worker technology. You're not going to get all of the benefits of using Workers if you self-host.
workerd is also single threaded so you'd run into the same limitations. I also don't think running workerd raw would allow you access to a real live production d1 database. Any info on why you're unable to deploy on Cloudflare?
@ggu
1. I don't mind that
Workerd
is single-threaded.
2. I only need Workerd
to access local data, not a live production database.
3. Due to certain network restrictions, I am unable to use Cloudflare
.
Thank you very much for your response.Hmm, what’s wrong with using miniflare/wrangler then?
@ggu miniflare has this problem
Can you use npx wrangler dev?