The search index did not load. Type again to retry.
Nothing in the docs matches “”.
↑↓ to moveenter to goesc to close
Create an app
5 min·Assumes: nothing
One command gets you a running app. Then you change a line, watch the page update, and build it for production. Takes roughly 5 minutes to learn.
Create your app
Here is a pretend terminal. Press Enter to see what the command creates, then hover any file to see what it's for. Prefer pnpm, Yarn or Bun? Type that instead, and every command on this page switches to match.
A pen-and-ink drawing of a desk. A sheet of paper drawn as a terminal waits at a shell prompt that takes the create command of npm, pnpm, yarn or Bun, the other managers named at the foot of the sheet: type one and press Enter, or press Enter on the empty line to take the suggestion. The commands on this page then follow the package manager you ran. It then asks the real questions one at a time: what you are building, the app's name, where it runs, whether to install dependencies and initialize git, and whether to create the app. Arrow keys move, Enter picks, typing names the app, Escape starts over. Below lies a closed folder labelled with the app's name. On Create app it opens and every file the chosen starter writes drops into it as a sheet of paper; the first page's name is washed yellow. Hover, tap or focus a sheet to read what that file is for.
Now do it in your real terminal:
npm create markless@latest
pnpm create markless
yarn create markless
bun create markless
Every question has a sensible default, so Enter, Enter, Enter is fine. Nothing touches your disk until you pick Create app.
Start the dev server
The dev server is what runs while you work. It serves your app at localhost:3000 and updates the page every time you save. Try it here first:
A pen-and-ink drawing of a desk. A sheet of paper drawn as a terminal shows cd my-markless-app already run, and a prompt waiting for you to run the dev script with npm, pnpm, yarn or Bun, the other managers named at the foot of the sheet. Below it lies a browser window at localhost:3000, still blank. Type one and press Enter, or press Enter on the empty prompt to take the suggestion: the dev server prints its Local address, and the browser shows the starter page frompages/index.tsrx, a Markless Router heading and a Count button. Press that button to count, as the real page does. Escape starts over.
Now in your real terminal:
cd my-markless-appnpm run dev
cd my-markless-apppnpm run dev
cd my-markless-appyarn run dev
cd my-markless-appbun run dev
Open localhost:3000. You'll see a heading and a button that counts.
Make a change
That whole page is one file, pages/index.tsrx. Here is the same file with a stylesheet and one extra attribute on <main>, so a seedling grows as you count. Click Count 0 a few times, then work through these:
PlaygroundType @ or < for suggestions · F1 explains a wordRestored your edit·
import { state } from '@markless/core';export default function Home() @{ let count = state(0); <mainclass="sprout" style={'--n:' + count}> <h1>Markless Router</h1> <buttononClick={() => count++}> Count {count} </button> </main>}