The program runs in the terminal and takes in user input to query a local database. Users interact with the application through the Node.js package, inquirer
. Inquirer provides a simple way to take in user input and use it to make mysql calls to the database. Inquirer relies on the asynchronicity of promises to construct the data objects before making the query.
Install npm - Node Package Manager
npm packages should be installed in the root directory of your project
npm install mysql console.table inquirer
More information about the required packages can be found below:
npmjs.org/console.table
npmjs.org/mysql
github.com/inquirer.js
Start the program by running
node bamazonCustomer.js
The program allows users to simulate a simple CLI to interact with their inventory. Users can walk through the steps of adding items to their cart and purchasing the items online. The database will
Keep track of the items you purchase as you shop through the virtual Bamazon store.
Bamazon Manager implements many of the same features as Bamazon Customer, while providing additional administrative privilledges. Managers can add new items, restock on existing products, and view the items that are almost out of stock.