Code Monkey home page Code Monkey logo

e-commerce-backend's Introduction

E-commerce Back End

Description

This project is the back-end for an e-commerce website. It provides a functional Express.js API that interacts with a MySQL database using Sequelize. The API allows users to perform various operations related to categories, products, and tags, such as retrieving data, creating new records, updating existing records, and deleting records.

The purpose of this project is to demonstrate the fundamental architecture of an e-commerce platform and showcase the implementation of the latest technologies for back-end development.

Installation

To install and run the project locally, follow these steps:

Clone the repository: git clone Navigate to the project directory: cd e-commerce-back-end Install the dependencies: npm install Set up the database connection by creating an environment variable file (.env) and adding the following details:

DB_NAME=<your-database-name>
DB_USER=<your-database-username>
DB_PASSWORD=<your-database-password>

Run the database migrations and seed the data: npm run seed Start the application: node server.js

Usage

Once the project is set up and running, you can use Insomnia to interact with the API. The following routes are available:

  • GET /api/categories: Retrieves all categories.
  • GET /api/products: Retrieves all products.
  • GET /api/tags: Retrieves all tags.
  • POST /api/categories: Creates a new category.
  • POST /api/products: Creates a new product.
  • POST /api/tags: Creates a new tag.
  • PUT /api/categories/:id: Updates a category with the specified ID.
  • PUT /api/products/:id: Updates a product with the specified ID.
  • PUT /api/tags/:id: Updates a tag with the specified ID.
  • DELETE /api/categories/:id: Deletes a category with the specified ID.
  • DELETE /api/products/:id: Deletes a product with the specified ID.
  • DELETE /api/tags/:id: Deletes a tag with the specified ID.

Walkthrough Video

Please find the walkthrough video demonstrating the application's functionality and meeting all the acceptance criteria here:

DEMO_VIDEO.mp4

License

This project is licensed under the MIT license.

e-commerce-backend's People

Contributors

jonny258 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.