Moss · API

server.page

Answers the page a path leads to: its name, the shell host that draws it, and the input its path carries, by canvas. A path that is the app’s own answers undefined. A path matches a page when both have the same number of segments and every literal segment is equal, and a :name segment captures the value in its position. Two pages that can answer one path stop the boot. The example leaves out the host.

Pages
{
  night: {
    path: '/programme/:night',
    canvases: [{ id: 'main', initial: ['programme'] }],
    params: 'main',
  },
  cast: {
    path: '/programme/:night/cast',
    canvases: [{ id: 'main', initial: ['programme'] }],
    params: 'main',
  },
}
Page per path
/programme/2026-10-24
  {
    name: 'night',
    inputs: { main: { night: '2026-10-24' } },
  }
/programme/2026-10-24/cast
  {
    name: 'cast',
    inputs: { main: { night: '2026-10-24' } },
  }
/programme
  undefined
/takings
  undefined
Pages that match the same path
{
  night: { path: '/programme/:night', canvases: [] },
  tonight: { path: '/programme/tonight', canvases: [] },
}
Error
moss: pages "night" and "tonight" can both answer one path — give them paths that differ in a
  literal segment.
Output matches the expected value

Computed when this site was built, by the installed package, which does not run in a browser. The site’s checks recompute it on every change.