For this activity, I created an Amazon-like storefront with MySQL. The app takes in orders from customers and depletes stock from the store’s inventory.
Requires creating a MySQL Database of your products and installing the MySQL and Inquirer packages to your files in order for functionality.
The products table should have each of the following columns:
item_id (unique id for each product)
product_name (Name of product)
department_name
price (cost to customer)
stock_quantity (how much of the product is available in stores)
Populate this database with around 10 different products. (i.e. Insert “mock” data rows into this database and table).
Then create a Node application called bamazonCustomer.js. Running this application will first display all of the items available for sale. Include the ids, names, and prices of products for sale.
The app should then prompt users with two messages.
Once the customer has placed the order, your application should check if your store has enough of the product to meet the customer’s request.
Insufficient quantity!, and then prevent the order from going through.However, if your store does have enough of the product, you should fulfill the customer’s order.


Helen Maschmeyer - JavaScript, Node, MySQL, Inquirer