This is a command line application that allows mimics a online storefront by taking orders from customers, calculating a total price, and adjusting stock in inventory.
- Node.js and a package manager installed to a terminal
- MySQL required for database
- Use yarn or your preferred package manager to install dependencies
Ex.
yarn install
npm install
- A database is required for storing product information for this app.
- Start MySQL server
- Run the queries found in the bamazon.sql file to create the bamazon database and tables
- Set up environmental variables for your database. Use the ex.env file as a reference
- In your terminal, run node on bamazonCustomer.js to start the app
Ex.
node bamazonCustomer.js
A console log showing current stock is shown in this demo. It is removed in the actual application. Below are common use cases
- Node.js
- NPM
- MySQL
- console-table-printer
- Inquirer
- dotenv
- Javascript es6 and above
- Classes
- Async await and promises