heranYang93 / e-commerce-back-end

This app is based on Express.js API and use Sequelize to interact with a MySQL database.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

E-commerce Back-end

This app is based on Express.js API and use Sequelize to interact with a MySQL database.
View Demo Part1 · View Demo Part2 · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contact

About The Project

Product Screenshoot

Internet retail, also known as e-commerce, is the largest sector of the electronics industry, generating an estimated $29 trillion in 2019. E-commerce platforms like Shopify and WooCommerce provide a suite of services to businesses of all sizes. Due to their prevalence, understanding the fundamental architecture of these platforms will benefit you as a full-stack web developer.

This task aims to configure a working Express.js API to use Sequelize to interact with a MySQL database.

(back to top)

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

(back to top)

Acceptance Criteria

  • GIVEN a functional Express.js API

  • WHEN I add my database name, MySQL username, and MySQL password to an environment variable file THEN I am able to connect to a database using Sequelize

  • WHEN I enter schema and seed commands THEN a development database is created and is seeded with test data

-WHEN I enter the command to invoke the application THEN my server is started and the Sequelize models are synced to the MySQL database

-WHEN I open API GET routes in Insomnia for categories, products, or tags THEN the data for each of these routes is displayed in a formatted JSON

-WHEN I test API POST, PUT, and DELETE routes in Insomnia THEN I am able to successfully create, update, and delete data in my database

(back to top)

Built With

The following dependencies/resources have been used:

(back to top)

Getting Started

Prerequisites

  • Node must be installed
  • mySQL must be installed

Installation

  • Install all necessary dependencies
    • sequelize, dotenv, mysql2, and cli-table must be installed
    npm i
    • Point the terminal to the main directory and run the following command
    npm start

(back to top)

Usage

  • Point the terminal to the main directory

  • Run the following command in mySQL CLI SOURCE db/schema.sql

  • Quit mySQL command line quit;

  • Populate the database with your own data or use the seed provided in the package npm run seed

  • Initiate the server npm run start

(back to top)

Contact

Heran Yang- LinkedIn

Project Link: https://github.com/heranyang93/team-profile-generator

(back to top)

About

This app is based on Express.js API and use Sequelize to interact with a MySQL database.


Languages

Language:JavaScript 100.0%