A Node.js script that allows users to edit a .json file containing a collection of key/value pairs.
This is an in-class project from the web-apps module, check out the module repo for some practice problems before diving right in.
- Clone the repo
cd
into the project
- Using CLI arguments
- Writing to the file system
- Structuring and using CLI apps
- Reverse-engineering
This repo comes with a fully-functioning (but unreadable!) demo. Play with this demo for a while to make sure you understand how your entries-manager-cli
should behave.
node demo.min.js
ornode demo.min.js -h
Fill in the blanks!
All done? Copy your finished code into a new file so you don't loose your working code, and refactor the new file to:
- Read & write from a .json file with this schema:
-
[ {key1: "value 1"}, {key2: "value 2"}, ... ]
-
- Read & write from a .txt file organized like this:
"key 1":"value 1","key 2:"value 2",...
- Make a better User Experience
- Create a
package.json
file in this directory ($ npm init
) - install boxen
- log boxes instead of just text!
- Create a