Install once and make your first edit
Run a tiny website on your computer. Change one sentence and see it in your browser.
Read
You need a terminal, a text editor and a browser. A terminal runs the commands below; a folder contains your project's files. No Rust programming, JavaScript or database setup is needed. Allow 15–30 minutes after installation; compilation time varies.
Install What with Cargo. It needs Rust 1.89 or newer: rustup.rs installs Rust, and rustup update brings an older toolchain up to date. Then run:
cargo install run-what --version 2.1.0 --locked
Check the installation:
run-what --version
Expected output: run-what 2.1.0
Installed, but seeing command not found?
If Cargo printed Installed package, your installation succeeded. On macOS or Linux, run these two lines in the same terminal:
export PATH="${CARGO_HOME:-$HOME/.cargo}/bin:$PATH"
run-what --version
If Cargo's warning names a different folder, use that folder in the export command. To keep the fix for future terminals, add the same export line to your shell's startup file.
--locked builds with the exact dependency versions the release was tested with. A different version means another installation comes first on your PATH: check command -v run-what (in PowerShell, Get-Command run-what -All), then reopen the terminal or correct PATH.
This course needs What 2.1.0. Version 1.7.5 and earlier do not work with it.
Change
Move to a folder where you keep projects, then run these commands. Choose another name if my-site already exists; creation never replaces existing files.
run-what new my-site
cd my-site
run-what dev
There is one starter and no template question. Leave the server running. Open http://127.0.0.1:8085; you should see “What?”, the sentence “Build modern web apps with just HTML.” and a box headed “Your first edit”, with links to this tutorial, the documentation and the CSS classes below it. This address points to your own computer.
my-site/
components/layout.html
site/application.what
site/index.html
static/app.js
static/styles.css
what.toml
data/ (initially empty)
site/index.htmlsupplies the homepage content and title.site/application.whatselects the sharedcomponents/layout.htmldocument around your content.what.tomlsets the address, port and session configuration. Restart the server after configuration changes.static/styles.cssholds your custom CSS, starting with the few rules that style this starter page. Framework CSS and browser runtime are supplied automatically; you do not copy them into the starter.static/app.jsis an optional JavaScript placeholder. This lesson requires no JavaScript edits.data/starts empty. Runtime files can appear here when the server runs; they are not source files or tutorial recovery content.
In your editor, open my-site/site/index.html. Replace its contents with the following. Only the sentence under the heading changes:
<what>
title = "What?"
</what>
<main class="starter">
<p class="starter-status"><span class="starter-dot"></span> Your site is running</p>
<h1 class="starter-title">What?</h1>
<p class="starter-lead">I am building my own website.</p>
<div class="starter-next">
<p class="starter-next-label">Your first edit</p>
<p class="starter-next-text">
Edit <code>site/index.html</code> and save.
The development server reloads the page for you.
</p>
</div>
<p class="starter-links">
<a href="https://getwhatnow.com/tutorial/start">Start the tutorial</a>
<a href="https://getwhatnow.com/docs/getting-started">Browse the documentation</a>
<a href="https://getwhatnow.com/docs/css-framework">See the CSS classes</a>
</p>
</main>
Where class="starter" comes from
In your project, starter is an ordinary CSS class defined in my-site/static/styles.css. It limits the content to 40rem, centers the column horizontally, and vertically centers the welcome message.
| Class in your starter | What it controls |
|---|---|
starter | Width, spacing and position of the whole welcome page |
starter-status, starter-dot | The “Your site is running” line and its green dot |
starter-title, starter-lead | The “What?” heading and the sentence beneath it |
starter-next, starter-next-label, starter-next-text | The first-edit box, its label and its instructions |
To see what the class controls, open static/styles.css and, inside .starter, change justify-content: center to justify-content: flex-start. Save the file and the welcome message moves toward the top. Change it back to center afterwards, so your project still matches the lesson's checkpoint.
You can edit or rename any of these classes in your project. What also ships a shared stylesheet with reusable classes such as flex, card and btn-primary. The reference groups them by purpose and shows examples: Layout and spacing classes · Buttons, cards and forms.
Check
Save the file. The browser should reload and show “I am building my own website.” If automatic reload is unavailable, refresh the page. Do not continue until the changed sentence is visible. The title remains “What?”.
Visit /does-not-exist: it should show a missing-page response rather than your homepage. In the terminal, press Ctrl + C to stop the server. Run run-what dev again from my-site; your edited sentence should still be there.
Recover
- Wrong version, file tree, or a template question: check
command -v run-whatandrun-what --version. An older executable can come first on PATH; reopen the terminal or correct PATH, and do not delete your project. - Port already in use: stop your other dev server with Ctrl+C, or run
run-what dev --port 8086and openhttp://127.0.0.1:8086. This is an intentional negative check in the replay. - Sentence unchanged: confirm the saved file belongs to the project shown in the server terminal, then refresh. This is an anticipated troubleshooting case, not a measured common learner failure.
For a clean comparison, create a new project under a different name and repeat the edit. Keep your original folder. Author recovery archives include only the six source files and their checksums; sessions and runtime databases are excluded.
Try
Change title = "What?" to title = "My website". Save and confirm the browser tab changes. The title is page metadata; the large heading is separate HTML content.
Continue
You can now run What and edit your own page. Continue with lesson 2: Give your website real pages, then shared layouts, reusable cards and static output. Keep this same project; no completed CMS starter is needed.
Return to the tutorial roadmap · Project structure reference