~/talk

Building a Node js runtime for the browser

Talkat BeJS Conf 2023 · 2023-05-11..05-12· [nodejs, web-platform]
slides:none on file

Codesandbox builds a Node.js–compatible runtime that actually runs in the browser by using web workers to emulate processes, loading parts like the transpiler, crypto and compression as WebAssembly modules, and implementing a custom Node‑compatible file system with the main thread as source of truth to provide synchronous file operations (claimed faster than Node). HTTP and websockets use an iframe preview relay plus a service worker; websockets send raw packets into the worker where a client and server are spawned and parsed, and the system runs real Node apps including Next and Vite.

AI-written summary · about

  1. 0:00Start
  2. 0:37npm modules to the rescue
  3. 2:37File System
  4. 3:30HTTP & Websockets → Service worker
  5. 5:53Got a basic server running
  6. 6:11Try it@nodebox.codesandbox.io
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.