CRUD

Create, Read, Update, Delete.

These are the basic Data Access operations. In this project you will build a basic command line application (CLI) that allows you to take read and write notes directly from the command line into a .json file.

Along the way you'll learn about Model Objects and File IO (one of Node's 3 super-powers).

Index


Learning Objectives

  • JSON
  • Reading & Writing to files
  • Model objects
  • Closures
  • CRUD operations
  • CLI's

TOP


Specifications

  1. For each basic model file in this demo app:

    • Write the model object
    • Test the model object in your /tests folder
  2. For each model file with "json" in the name:

    • Write the model object
      • User Stories:
        • Create
        • Read
        • Update
        • Delete
        • Initialize (creates .json file with empty DB object)
        • Reset (clears nextID & data)
        • Set name of DB
        • See a helpful message or error after each operation
    • Test the model objecti in your /tests folder
  3. Write a Node.js Handler & View.
  4. Build a repo for this project and include it on your portfolio.

Challenge:

  • Allow a user to CRUD nested notes

TOP


Resources

File I/O in Node:

Error Handling with Callbacks:

Blocking & Non-Blocking:

NPM Installing:

Closures:

TOP



results matching ""

    No results matching ""