cloudflare · Cloudflare Workers Docs
Workers EventEmitter
How to enable and implement the Node.js EventEmitter API within Cloudflare Workers, including configuration requirements and error handling considerations.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Workers EventEmitter
How to enable and implement the Node.js EventEmitter API within Cloudflare Workers, including configuration requirements and error handling considerations.
When To Use
Use when you need to implement event-driven patterns in Cloudflare Workers or need to configure the runtime to support Node.js EventEmitter functionality and error handling.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/workers-runtime-apis-nodejs-eventemitter-workflow-guide.md | Documentation explaining how to enable and use the Node.js EventEmitter API within Cloudflare Workers using the nodejs_compat compatibility flag. | Questions about documentation explaining how to enable and use the Node.js EventEmitter API within Cloudflare Workers using the nodej... |
examples/workers-runtime-apis-nodejs-eventemitter-cloudflare-workers-nodejs-event.text | A JavaScript code example demonstrating how to instantiate and use the Node.js EventEmitter class within a Cloudflare Workers environment. | Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to instantiate and use the Node.js EventEmitter class within a Cloudflare... |
examples/workers-runtime-apis-nodejs-eventemitter-cloudflare-workers-nodejs-event-2.text | A text example demonstrating how to instantiate a Node.js EventEmitter with captureRejections enabled in a Cloudflare Workers environment. | Exact payloads, commands, or snippets shown in A text example demonstrating how to instantiate a Node.js EventEmitter with captureRejections enabled in a Cloudflare... |
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/eventemitter
