Arguments, Exit Codes and Clear Errors

A command-line tool reads the words typed after it with process.argv and util.parseArgs, prints a --help line, sends errors to console.error with a message a person can act on, and sets process.exitCode so the computer that ran it knows whether it worked.

By

Updated

Cheat sheet: Arguments, Exit Codes and Clear Errors
Category
Node.js
Level
Apprentice
Tags
Exit Code (operating-system), flags-and-options, JavaScript, nodejs, process.argv, util.parseArgs