wolfskillobyte / black-friday

Back-end E-commerce application utilizing Sequelize and Express.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

E-Commerce Back-End

User Story

AS A manager at an internet retail company
I WANT a back end for my e-commerce website that uses the latest technologies
SO THAT my company can compete with other e-commerce companies

Table of Contents


Preview

Here is how the application appears and functions in Insomnia

Walkthrough

This video will show you how to set up the project.

The following videos show the routes being tested in Insomnia.

Installation

This project requires Node.js and other dependencies

After you have installed Node, navigate to the directory you would like to use using the CLI and then clone this repository:

git clone git@github.com:wolfskillobyte/black-friday.git

Create .gitignore to include the following:

node_modules
.env
.DS_Store
package-lock.json

.env will hold your sensitive information.

DB_NAME='ecommerce_db'
DB_USER='root'
DB_PW='YOUR_PASSWORD_HERE'

Open VS code and use these commands to get you started:

npm install mysql2 dotenv express sequelize
npm init

npm init will create your package.json file. Make sure package.json includes the seed in your scripts:

"scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "node server.js",
    "seed": "node seeds/index.js"
}

Login to MySQL with your credentials.

mysql -u root -p

In the MySQL terminal, start the database

USE ecommerce_db;

Then seed the schema files

source ./db/schema.sql;

Go back to your main terminal or VS Code powershell and enter

npm run seed

This will seed all the files so they can be tested in Insomnia.

Finally, start the application from the command line:

node server
_OR_
npm start

Database Schema

Tests

This project used Insomnia for testing

Documentation

Feedback

Have something you'd like to add?
Feel free to contact me via email!

About

Back-end E-commerce application utilizing Sequelize and Express.


Languages

Language:JavaScript 100.0%