@emkodev/emroute
v1.12.6
Published
File-based (but storage-agnostic) router with triple rendering (SPA, SSR HTML, SSR Markdown). Zero dependencies.
Downloads
696
Maintainers
Readme
Every route renders three ways from the same component: a Single Page App
in the browser, server-rendered HTML, and plain Markdown. No separate
API layer — prefix any route with /md/ and get text that LLMs, scripts, and
curl can consume directly.
GET /projects/42 → SPA (hydrated in browser)
GET /html/projects/42 → pre-rendered HTML
GET /md/projects/42 → plain MarkdownInstall
npm add @emkodev/emroute # or bun add, pnpm add, yarn addWorks on Node, Bun, and Deno.
Quick taste
Routes are files. The filesystem is the config.
routes/
index.page.md → /
projects.page.md → /projects
projects/[id].page.ts → /projects/:idA route can be a .md file, an .html template, a .ts component, or any
combination. When a .page.ts exists, it controls data fetching and
rendering. When it doesn't, the framework renders the companion file
directly.
Documentation
Everything else — setup, routing, widgets, SSR, hydration, the runtime abstraction, design decisions — lives at emroute.emko.dev.
License
MIT
