Coder Social home page Coder Social logo

vish-opatha / e-commerce-backend Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 53 KB

This is a project to implement the backend of an e-commerce website.

License: MIT License

JavaScript 99.84% Shell 0.16%
nodejs mysql restful-api object-relational-mapping sequelize insomnia dotenv mysql2 orm-framework

e-commerce-backend's Introduction

E-Commerce Website

License: MIT

Description

This project is a backend resembling an E-Commerce website in which several details are retrieved, updated, deleted and created using a selected Object Relational Mapping (ORM) package with a database. There are several tables in the database which can be used perform the above functionalities. Each and every table support CRUD using the ORM. This project is based on Node.js and MySql. Sequelize, MySql2 and dotenv packages are used in the application.

All the routes and the associated results are simulated using Insomnia Core.

Table of Contents

Important Links

Following are the important links related to this application.

Installation

First, install the necessary dependencies, using the following command:

npm install 

Then, in the command prompt run the following command to enter the MySQL shell:

mysql -u <name of the user> -p 

An example user can be root.If you have set a password for the user, you will be prompted for the password. Enter the password there, and login to the MySQL shell.

Then, in the MySQL shell run the following command to create the database. Script for the database resides in the db folder.

source db/schema.sql

After that, amend the variables in the .env file. Finally, when you have amended the .env file with proper variable, you can run the following command to seed data to the database. Seeding creates the tables and insert some rows in those tables.

node seeds

Note: You can see the 'Installation' video in the Important Links section, if you need more details.

Usage

To start the server, run the following command.

node server.js

Note: You can see the 'Walkthrough' video in the Important Links section, if you need more details.

Technical Acceptance Work Done

  1. The application is connected to MySQL database using Mysql2 and sequelize properly and synced as required.
  2. Models for the product, category, tag are created as specified in the requirement. Furthermore, routes are created to GET, POST, PUT and DELETE for each table.
  3. Implementation of the backend routes facilities the user to create new rows, update rows, delete and to retrieve them from the database.
  4. Sensitive enviornment data are accessed and saved using the .env file through 'dotenv' package.

Repository Quality Work Done

  1. Repository is named as e-commerce-backend.
  2. Tags are indented accordingly and comments are included while following the best practices for naming conventions.
  3. Changes were committed multiple times with messages.
  4. Repository includes videos for the intallation and walkthrough with Insomnia Core.

Questions

If you have any questions about the repo, open an issue or directly contact me at [email protected] You can find my other work at Github

e-commerce-backend's People

Contributors

vish-opatha 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.