Serve
Open the catalogue in your browser while you work.
Start the server
npx moklymokly on its own is mokly serve. It starts at port 4173, prints the URL
and watches your sources. Navigation and previews are available immediately;
each screen is rendered when you open it, and the complete build and the
comparison with your Git base finish in the background.
To open the URL in your default browser as soon as the server is ready, run:
npx mokly --openChoose a port
If 4173 is taken, Mokly tries each following port until one is free. Ask the
operating system for any free port with --port 0, or name your own:
npx mokly serve --port 4300A watched server keeps the port it resolved, so the URL stays the same across restarts.
Work without watching
npx mokly serve --no-watchThat serves one deterministic snapshot: the same fast start, without picking up later edits.
Serve normally writes nothing to mokly-generated/. For an output tree that
updates after each successful complete compilation, use npx mokly serve --build.
Add --no-watch to write just once after the initial compilation. The parent
process handles the write; failed compiles leave the last-good tree intact.
What you can do there
Every entry has the address /view/<path>/, so the screen at
specs/account/account-home.mockup.tsx opens at
/view/account/account-home/. Browse the catalogue by folder, search it,
switch viewport and color scheme, open the details of a screen and compare a
changed screen with its base. The Catalogue section describes each of those.