A repository README review copy with complete example source, usage and a missing-name failure
HTML for this example
Select the code and use your copy shortcut. Changes in this preview are temporary.
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta http-equiv="Content-Security-Policy" content="default-src 'none'; style-src 'unsafe-inline'; form-action 'none'; base-uri 'none'"><title>hello-note · README review copy</title><style>*{box-sizing:border-box}body{margin:0;font:16px/1.5 Arial,Helvetica,sans-serif;color:#24313b;background:#fff}main{max-width:900px;margin:auto;padding:22px}h1{font-size:26px;line-height:1.2;margin:8px 0 18px}h2{font-size:19px;margin:22px 0 10px}h3{font-size:17px;margin:14px 0 8px}p{margin:10px 0}ul,ol{padding-left:22px}li{margin:6px 0}.note{font-size:13px;color:#53616a}.callout{border-left:4px solid #405d73;background:#f2f5f7;padding:10px 14px}table{border-collapse:collapse;width:100%;margin:12px 0}caption{text-align:left;font-weight:bold;padding:0 0 8px}th,td{padding:9px 8px;text-align:left;vertical-align:top;border-bottom:1px solid #b8c3ca;overflow-wrap:anywhere}th{background:#edf2f5}td b{display:none}footer{border-top:1px solid #aeb9bf;margin-top:22px;padding-top:12px}pre{white-space:pre-wrap;overflow-wrap:anywhere;font:16px/1.5 ui-monospace,monospace;background:#f5f5f5;padding:12px}@media(max-width:560px){main{padding:16px}h1{font-size:23px}thead{display:none}table,tbody,tr,td{display:block;width:100%}caption{display:block}tr{border-bottom:1px solid #aeb9bf;padding:6px 0}td{border:0;padding:3px 0}td b{display:inline}}@media print{@page{size:letter;margin:.5in}main{padding:0}}h1{border-bottom:2px solid #384951;padding-bottom:10px}pre{border:1px solid #b9c4cb;background:#f7f8f9;font-size:16px}code{font-family:ui-monospace,monospace}</style></head><body><main><p class="note">Original executable documentation exercise · repository README.md remains authoritative</p><h1>hello-note · get started and recover</h1><p>One nonblank name produces a greeting. No dependencies, API keys or published package. Save the full source below as <code>hello.mjs</code>.</p><h2>First run</h2><pre><code>node hello.mjs Sam
Hello, Sam!</code></pre><p>Expected exit status: 0. This sample was checked with Node 24.11.0; supported versions for your actual project: [TO CONFIRM].</p><h2>Missing-name failure</h2><pre><code>node hello.mjs
Usage: node hello.mjs NAME</code></pre><p>The usage instruction is written to stderr, with exit status 1. Supply exactly one nonblank name; quote multiword names in your shell. No fake success if the argument is missing.</p><h2>Complete example source · hello.mjs</h2><pre data-code><code>const args = process.argv.slice(2);
if (args.length !== 1 || !args[0].trim()) {
console.error('Usage: node hello.mjs NAME');
process.exit(1);
}
console.log('Hello, ' + args[0].trim() + '!');
</code></pre><h2>Copyable Markdown · README.md</h2><pre data-readme><code># hello-note
Original tiny greeting CLI documentation exercise; no published repository or package.
## Prerequisites
Node runtime. This source was checked with Node 24.11.0; confirm supported versions for your own project.
No installed dependencies or environment secrets.
## Setup
Save the complete source supplied in the review copy as hello.mjs in your working directory.
Save this Markdown as README.md in your repository root.
## Usage
~~~sh
node hello.mjs Sam
~~~
Expected stdout: Hello, Sam!
Expected exit status: 0.
## Missing or invalid name
~~~sh
node hello.mjs
~~~
Expected stderr: Usage: node hello.mjs NAME
Expected exit status: 1.
Supply exactly one nonblank name argument, for example Sam. Quote a multiword name in your shell.
## Repository details to confirm
Repository location, maintainer contact and license: [TO CONFIRM].
No clone URL, build badge or license badge invented.
</code></pre><footer>Put the final Markdown in the actual repository. Repository location, maintainer and license remain [TO CONFIRM]. This HTML copy does not create repository files, issue badges or notify contributors.</footer></main></body></html>