Sequence NODE_231
MediumBuild a Simple Todo CLI (JSON Storage)
Node.js
Technical Specification
Create a todo CLI where you can add and list todos stored in a JSON file.
Input/Output Samples
Input:node todo.js add "Learn Node"
Output:Added: Learn Node
Input:node todo.js list
Output:1. Learn Node
Optimal Logic Path
// pseudo-code structure
// 1) load todos.json or default []
// 2) if cmd === "add" => push new todo, save
// 3) if cmd === "list" => print all
Architectural Deep-Dive
A small CLI showcases reading argv, manipulating JSON, and persisting simple data.