Hacker News new | ask | show | jobs
by zuprau 1123 days ago
I might be wrong, but they're more like a browser’s "service worker" than a Node app.[0] The fact that they have to manually add "compatibility" with Node modules like `utils`[1] seems to support this.

[0]: https://blog.cloudflare.com/node-js-support-cloudflare-worke...

[1]: https://blog.cloudflare.com/workers-node-js-asynclocalstorag...

1 comments

That's exactly right, and they even use the same API[1] for accepting and replying to HTTP requests . As well as supporting other service worker APIs like caches.

[1] https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent