cloudflare · Cloudflare Workers Docs
Workers dns
Implements DNS name resolution within Cloudflare Workers using the node:dns module via DNS over HTTPS, requiring the nodejs_compat compatibility flag.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Workers dns
Implements DNS name resolution within Cloudflare Workers using the node:dns module via DNS over HTTPS, requiring the nodejs_compat compatibility flag.
When To Use
Use when you need to perform DNS name resolution within a Cloudflare Worker using Node.js compatible syntax via DNS over HTTPS.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/workers-runtime-apis-nodejs-dns-workflow-guide.md | Documentation detailing the Node.js DNS API compatibility and usage within Cloudflare Workers. | Questions about documentation detailing the Node.js DNS API compatibility and usage within Cloudflare Workers. |
examples/workers-runtime-apis-nodejs-dns-cloudflare-workers-nodejs-dns-resolve4.text | A JavaScript code example demonstrating how to use the node:dns module to resolve IPv4 records within a Cloudflare Worker. | Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to use the node:dns module to resolve IPv4 records within a Cloudflare Wo... |
examples/workers-runtime-apis-nodejs-dns-cloudflare-workers-nodejs-dns-resolve4-2.text | A JavaScript code example demonstrating how to use the node:dns module to resolve IPv4 records within a Cloudflare Worker. | Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to use the node:dns module to resolve IPv4 records within a Cloudflare Wo... |
What This Skill Covers
- To enable built-in Node.js APIs and polyfills, add the nodejs\compat compatibility flag to your Wrangler configuration file. This also enables nodejs\compat...
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://developers.cloudflare.com/workers/runtime-apis/nodejs/dns
