Contacts App is developed in JavaScript and NodeJS and works in terminal. User provides specified input in terminal and get outputs in terminal too. Contacts App is used to Create a Contact, Read a Contact, Remove a Contact and Read all Contacts. A Contact body contains name
, mobile
and email
.
Demo : CodeSandBox
node app.js add --name="Shashi Kant Yadav" --phone="9876543210" --email="[email protected]"
If Mobile number already present, It will show error
node app.js remove --name="Shashi Kant Yadav"
If Contact is not present in JSON file, then it will show error
node app.js read --name="Shashi Kant Yadav"
If Contact not found then it will show an error
node app.js list
If No contacts in JSON File, then it will show something like this