Processes & servers
Run a server in one process and reach it from another over loopback.
$ cat > server.cjs <<'EOF'require('http').createServer((req, res) => res.end('ok from another isolate')) .listen(3000, () => console.log('listening on 3000'));EOF$ node server.cjslistening on 3000$ curl http://127.0.0.1:3000/ok from another isolateThat curl crossed an isolate boundary. Each process runs in its own V8
isolate with a 128 MiB heap, so the platform’s memory cap is a
per-process budget. The supervisor joins processes through its port
registry. Start a server and it automatically becomes resident, with a
keyed isolate and a registered port.
One-shot processes run, stream their writes back, and exit. Residents survive
across requests and own ports. Attached TTYs are residents with an interactive
tab (terminal & shell, alpha). The supervisor owns
the process table, so ps stays accurate after a facet eviction. A process
that cannot be restored is marked dead with a reason, so you never get a
zombie. Logs are durable and bounded. Node supports child_process.spawn,
exec, and execFile with piped stdio.
Listening ports open and focus preview tabs. The path uses real
Request/Response objects and streams as data arrives. SSE ticks, chunked
bodies, and curl output stay live; Ctrl+C cancels.
Vite HMR measures 302 ms median end to end.
Every port gets a private preview URL, https://<port>--<session>.<suffix>/,
and the server behind it is durable: after a platform reset, the next request
restarts it and waits for it. Sharing is explicit. nimbus expose 3000 --public
prints a link anyone can open, bound to that program rather than the port, so
an unrelated server on the same port never inherits it. nimbus app list,
nimbus app url <name>, nimbus app rotate <name>, and nimbus app remove <name> manage it from the shell; the SDK has the same verbs as box.apps.
A crashed server stays down unless it was started with
nimbus start --restart on-failure node server.cjs.
Outbound access is open. fetch, Node HTTP clients, npm, pip, gem, and git
use it. WASI binaries get TCP through /dev/tcp/<host>/<port>. Inbound access
is HTTP(S) through session routes. The platform has no raw public TCP inbound.
Loopback lets one app span cooperating isolates. The opencode server and TUI
pair is alpha. fork() runs inside the installable bash program, whose
facet carries a fork, exec, and waitpid scheduler. The default process
model does not fork yet (the process
fabric).