A fictional store full of CRUD with a CLI. MySQL and Node.js
This is a command line application based on the idea of a store. This is a fictional store, the app is just for fun.
How to Use
Note: To run this application you will need to have npm installed (How to install NPM). Additionally, to avoid complications, it is reccommended that you are using bash as your shell. Install Bash for Windows.
To run the application on your machine, clone this repository (How to clone a repo). Once you have cloned the repository, navigate to the newly cloned "shell-store" directory and run
npm install to install the dependencies defined in this project's package.json file.
There are two files you can run:
$ node customer.js
You take on the role of a potential patron of the shell store (see, its an RPG too, who knew?!).
Features of customer.js
- Displays all products at start
- Choose a product to buy (selecty by ID #), and choose qty to purchase.
- The qty you purchase will be removed from the stock qty field, and your purchase total will be displayed.
- If the stock qty is at 0, you will get a message saying the item is out of stock.
$ node manager.js
You take on the role of manager at the shell store.
Features of manager.js
- View Products - lists all products
- View Low Inventory - products with less than 5 stock qty will be displayed.
- Replenish Inventory - re-stock the inventory of an item
- Add New Product - add a new product to the database