totally lost newbie here: but what is the difference between running javascript on the browser and running node.js on the browser?
This is going full inception mode. Nodejs is compiled to wasm (like assembly for your browser), and then loaded inside the browser, which can then run javascript. So a full JS engine is loaded, completely separate from the built-in one.
WebContainers: Run Node.js natively in the browser
51–60 of 238 posts
Re: WebContainers: Run Node.js natively in the browser
#52At LeaningTech we have since several months been able to run nodejs, but also python and ruby using our Wasm based x86 VM (CheerpX), the demo is available here: https://repl.leaningtech.com/?nodejs
With our solution the full Linux x86 binary of nodejs is running including the whole of V8 and its JIT engine. Of course fully client side.
Re: WebContainers: Run Node.js natively in the browser
#53I think very few people will realize the systemic effects that a demo like this entails. Very, very good work StackBlitz team!
Re: WebContainers: Run Node.js natively in the browser
#54Hi all- CEO of StackBlitz/author of this blog post here. Happy to answer any questions! (Also, thanks for posting this bpierre!)
Re: WebContainers: Run Node.js natively in the browser
#55I think very few people will realize the systemic effects that a demo like this entails. Very, very good work StackBlitz team!
If their base is node, that implies we could start to see many electron.js app being ported to the browser
EDIT: Upon closer inspection, it looks like this is an online IDE meant to mimic a desktop environment. I don't know if there's any demand for that, but sure, why not. I'm sure someone will come up w/ a reason to run WebAssembly in a jQuery plugin, too.
Re: WebContainers: Run Node.js natively in the browser
#56I think very few people will realize the systemic effects that a demo like this entails. Very, very good work StackBlitz team!
Re: WebContainers: Run Node.js natively in the browser
#57totally lost newbie here: but what is the difference between running javascript on the browser and running node.js on the browser?
basically node exposes all these other APIs like reading a file from disk. Browser also has APIs like detecting when the page is fully loaded that wouldn't be available on Node. What JavaScript syntax is supported can also vary between Node and browsers.
Re: WebContainers: Run Node.js natively in the browser
#58Re: WebContainers: Run Node.js natively in the browser
#59Earlier quoted context omitted.
If their base is node, that implies we could start to see many electron.js app being ported to the browser
ELI5... why would you want to run an Electon app in the browser? Isn't that just a website at that point? EDIT: Upon closer inspection, it looks like this is an online IDE meant to mimic a desktop environment. I don't know if there's any demand for that, but sure, why not. I'm sure someone will come up w/ a reason to run WebAssembly in a jQuery plugin, too.
Or a desktop-only Electron App would be usable from a mobile phone browser etc.
Re: WebContainers: Run Node.js natively in the browser
#60Earlier quoted context omitted.
Yep- if you go to https://stackblitz.com you can start a Next.js, GraphQL, etc dev environment in one click.
... in chrome.
Supporting chrome/chromium doesn't seem like a bad place to start with a prototype with that kind of potential adoption.