I've created an Amazon-like storefront with the MySQL skills I learned this unit. The app will take in orders from customers and deplete stock from the store's inventory.
- ask for product ID
- ask for Quantity of product
- inquirer
- mysql
- First step is to download inquirer and mysql in your command prompt or git bash.
- Second step is to open the command prompt at the Node.js-MySQL folder.
- Next type in:
node bamazonCustomer.js(or whatever you named your JavaScript file). - Then it will show you the products that are in the database.

- After that it will as you for the ID of the product you want (type in the ID number).

- It will then ask you for the Quantity of the amount of the product you want (type in the Quantity amount).

- Then it will show you the Quantity that is left over.

- After that is done you can rerun the
node bamazonCustomer.jsor open up the MySQL database and it will show that it updated. Before:
.png)
After:
.png)
- .gitignore
- bamazon_db.sql
- bamazonCustomer.js
- package-lock.json
Israel Harvin 8/6/2019