Skip to content

An ecommerce backend that uses Node, Sequelize and MySQL2 to interact with a database and create APIs for CRUD operations

Notifications You must be signed in to change notification settings

DanLawrence91/e-commerce-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

E-commerce Backend

Description

This is a backend application created using Node.js, Express, Sequelize, MySQL2 and dotenv where I have used Sequelize to interact with the MySQL database and created APIs to run CRUD operations.

Installation

The project can be installed by cloning the repo from github. Once this is done run npm install to download the dependencies needed for the project. Then run the MySQL shell to create the database. Once the database is created if you are using the seed data run node seeds/seed.js from the terminal to populate the database. Then type in npm start to being the server to test the APIs. I have tested them using INSOMNIA.

Usage

The project has GET, POST, PUT and DELETE API routes for different categories, products and tags in this e-commerce store. They can all be used to carry out their relevant operation to amend or view the data in the database.

When the project is running based on the installation above and the server has been started each of the API routes for category, product and tag can be tested for their CRUD operations. I have used INSOMNIA to test them in the walkthrough video below. Please see below for an example of what one of the working API routes looks like in INSOMNIA.

Example of API GET route working in Insomnia

Routes Available

  • Categories

    • View all categories and any associated products
    • View category by ID
    • Add a category
    • Update a category
    • Delete a category
  • Products

    • View all products
    • View product by ID
    • Add a product
    • Update a product
    • Delete a product
  • Tags

    • View all tags
    • View tag by ID
    • Add a tag
    • Update a tag
    • Delete a tag

Walkthrough Video

Please follow the link to watch the walkthrough video on how to use this backend

Questions

If there are any questions regarding this project please contact me through my email - dan.lawrence0810@gmail.com
Or please visit my GitHub profile which has further contact information - DanLawrence91

About

An ecommerce backend that uses Node, Sequelize and MySQL2 to interact with a database and create APIs for CRUD operations

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published