Hacker News new | ask | show | jobs
by benatkin 1632 days ago
I'd like to see Node.js running on it. I know StackBlitz has "WebContainers" but I'm looking for something open source.
2 comments

Er, why? You want to run a JS implementation on top of a JS implementation?

(I'm not super familiar with this ecosystem so I'm probably missing something obvious like libraries or something)

The ability to run code targetted to Node.js along with its own standard library within the browser, at least in a mostly accurate way. Writing Javascript on the web is fairly different than writing Javascript for Node.js, mainly (1) the APIs that are available to you and (2) the capabilities that are available to you. It's useful for developer tooling (Stackblitz does just this).

So it's not about running a JS implementation on top of a JS implementation per se, but being able to run JS code that uses things like CommonJS require(), Node builtin modules, etc

Also, StackBlitz reuses as much as possible the existing V8 runtime from the browser, rather than really running another node.js via WASM.