Skip to content
CLI Storefront built using Node.js and MySQL - user can see inventory levels, prices, and purchase items - database live updates with new quantities
JavaScript
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
README.md
customer.js
customerjs.gif
package-lock.json
schema.sql
sqlschema.gif

README.md

SQL Storefront

CLI Storefront built using Node.js and MySQL

Demo

Storefront Running in Node

js file running in node

SQL Database / Tables Created

Schema - Database Initalize Gif Demo

Code Explanation

  • Schema.sql file contains query to create initial database and product table
  • Customer.js is run in node.js to initiate CLI Storefront
  • File connects to MySQL database through localhost - password is saved in separate .env file
  • Table is displayed showing products, and node's inquirer package is used to prompt what product the customer would like to purchase
  • If valid selection and quantity are chosen, table updates with appropriate info and customer is prompted again with new updated table displayed
You can’t perform that action at this time.