3 ms·
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 modul
by zuprau 3y 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-workers/#supporting-native-apis https://blog.cloudflare.com/node-js-support-cloudflare-worke...
[1]: https://blog.cloudflare.com/workers-node-js-asynclocalstorage/ https://blog.cloudflare.com/workers-node-js-asynclocalstorag...
- crabmusket 3y agoThat'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 https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent