Node.js compatibility ยท Cloudflare Worke...

Does anyone know off-hand if the net and socks node packages are supported by Workers? I don't see them here, which makes me think not ๐Ÿ˜… https://developers.cloudflare.com/workers/runtime-apis/nodejs/
Cloudflare Docs
Node.js compatibility ยท Cloudflare Workers docs
Implemented Node.js runtime APIs and enablement instructions for your Worker project.
2 Replies
cole
coleโ€ข4mo ago
Found this! Looks like I may be refactoring this code a bit ๐Ÿ˜„ https://blog.cloudflare.com/workers-tcp-socket-api-connect-databases
But for TCP sockets, we faced a challenge โ€” there was no clear shared standard across runtimes. Node.js provides the net and tls APIs, but Deno implements a different API โ€” Deno.connect. And web browsers do not provide a raw TCP socket API, though a WICG proposal does exist, and it is different from both Node.js and Deno.
The Cloudflare Blog
Announcing connect() โ€” a new API for creating TCP sockets from Clou...
Today, we are excited to announce a new API in Cloudflare Workers for creating outbound TCP sockets, making it possible to connect directly to databases and any TCP-based service from Workers.
cole
coleโ€ข4mo ago
Dug into this further. The answer is definitely "no" and there is a great writeup on sockets here: https://blog.cloudflare.com/workers-tcp-socket-api-connect-databases
The Cloudflare Blog
Announcing connect() โ€” a new API for creating TCP sockets from Clou...
Today, we are excited to announce a new API in Cloudflare Workers for creating outbound TCP sockets, making it possible to connect directly to databases and any TCP-based service from Workers.
Want results from more Discord servers?
Add your server