Skip to content

🔳 A command line Node.js / mySQL storefront app.

Notifications You must be signed in to change notification settings

sam-pop/CLI-storefront

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bamazon

bamazon is a command line Node.js / mySQL "Amazon-like" storefront app.

This CLI app will take in orders from customers and deplete stock from the store's inventory, track product sales across the store's departments and provide a summary of the sales, over-head expenses and profits of each of the store's departments.

The app uses a node.js driver for mysql to establish a connection to the database and utilize SQL queries to perform CRUD operations in the database.

How to use

Prerequisites:

  • mySQL server
  • Node.js and NPM (package manager)

Before running the app, you will have to use the npm install command from the command-line to install the required packages (using the package.json file).

Make sure your MySQL server is up and running in the background -> from the mysql console (mysql -u root), run the command source schema.sql to build our SQL schema.


Run the following commands:

node bamazonCustomer.js - for the Customer view.

node bamazonManager.js - for the Manager view.

node bamazonSupervisor.js - for the Supervisor view.


What I used

This app was built using Node.js, mySQL (database) and the following NPM packages: inquirer, mysql, cli-table,colors.

Examples

Below are examples of the different store views: (click on the image for the full video)

Customer View:

bamazon_Customer.gif

Manager View:

bamazon_Manager.gif

Supervisor View:

bamazon_Supervisor.gif

Note

The Deprecation Warnings in the examples are from the current mysql module (v2.15.0) deprecated methods in node v10.5.0.

About

🔳 A command line Node.js / mySQL storefront app.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published