files-inspector
Lists the files in the current working directory and renders them through a Preact SPA. A node-modules-inspector-style demo that exercises every devframe surface end to end.
Package: files-inspector-example · framework: Preact + Vite
What it shows
- CLI dev server —
node bin.mjsboots an HTTP + WebSocket server backing live RPC. - Static build —
node bin.mjs buildproduces a self-contained directory (SPA + baked RPC dump) deployable to any static host. - Runtime base discovery — the client is built with
vite.base: './'and readsdocument.baseURIat runtime, so the samedist/clientworks under any base path without rebuilding. - Two RPC types —
:list-filesis aquerybaked into the dump;:get-cwdis astaticRPC.
Run it
sh
pnpm -C examples/files-inspector run build # build the Preact client
pnpm -C examples/files-inspector run dev # CLI dev server (live RPC)
pnpm -C examples/files-inspector run cli:build # static deploy → dist/staticThe dev server prints its URL. Serve dist/static from any static host — relative asset paths make it portable.