Build reliable habits in the Node playground—the same loop transfers to local projects with node main.mjs, nodemon, or your IDE debugger.
Recommended workflow
- Read the concept section before editing code.
- Click Run to execute ESM on the dev runner.
- Use
console.logfor values; useconsole.errorfor errors (stderr). - Change one idea at a time—one import, one await, one route handler.
- Read stack traces from bottom to top to find your file and line.
- Reset the editor if you drift far from the lesson goal.
What the runner can and cannot do
- Can — ESM imports, built-in
node:modules, async/await, short-livedhttp.createServerdemos - Conceptual — Express/Nest apps,
npm install, long-running servers, databases - Needs local setup — real Express project, MongoDB/PostgreSQL, Docker deploy, WebSockets at scale
Review JavaScript promises if async output order confuses you—it is the same language, new runtime APIs here.
Self-check
- Why does this track use ESM in the editor?
- When should you use
console.errorinstead ofconsole.log?
Challenge
First run
- Click Run with the default code.
- Confirm
process.versionprints in the output. - Add a second
console.logwith a custom message.
Done when: the terminal shows the Node version and your custom message.