ORM-ECommerce-Back-End

Object-Relational-Mapping (ORM): E-commerce Back End đź‘‹

Description

ORM E Commerce is a Back end API built for the back end developers. This API is built using Express.js and configured to use Sequelize in order to interact with MySQL database.

Table of Contents

App Demo

Schema ans Seeds File

All Categories, Products and Tags

Single Category, Product and Tag

POST, PUT and DELETE for Categories

POST, PUT and DELETE for Products

POST, PUT and DELETE for Tags

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

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 Core 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 Core
THEN I am able to successfully create, update, and delete data in my database

Database Models

Associations

I have executed association methods on my Sequelize models to create the following relationships between them:

Installation

đź’ľ

npm init

npm install express

npm install mysql2

npm install sequelize

Usage

đź’»

Run the following command at the root of your project and answer the prompted questions:

npm run seeds

npm start

Contributing

:My Github Link: Mirza Awal

Questions

✉️ Contact me with any questions: email , LinkedIn