Skip to content

TheInfamousGrim/orm-e-commerce-back-end

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

E-commerce Back End Starter Code

Contributor Covenant Last Commit to Current Repo Commits a month

A backend for an e-commerce website.

Table of Contents 📃

  1. Description
  2. Screenshot
  3. Usage
  4. Technology
  5. Features
  6. Credits
  7. License
  8. Contribution Guidelines
  9. Feedback

Description

The purpose of this application is to create a back end for an e-commerce site using ExpressJS to create an API and configure it using Sequelize to interact with the MySQL database.

The application is a backend application that can do the following:

  • Use a .env file to store the database name, MySQL username and MySQL password
  • The application can use these environment variables to connect to the db
  • A development database can be created using schema and seed commands
  • Open API GET routes in Insomnia core to get the data for categories, products or tags
  • POST, PUT and DELETE routes will perform CRUD operations on the db

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

What did I Learn 🏫

The big take away from this project was learning how to use sequelize to create a model and link to a db with a config folder.

Other things I learned:

  • Furthered my understanding of NPM scripts
  • How to use environment variables
  • Become more familiar with REST API's

Installation

In order to install this backend e-commerce app and test it you need to follow these steps.

  1. Ensure that you have node and npm installed

  2. Ensure that you have mySQL installed

  3. Clone this repository into your local repository.

    • git clone git@github.com:TheInfamousGrim/orm-e-commerce-back-end.git.
  4. Install the dependencies to your package.json

    • npm install
  5. Login in to mySQL CLI

    • mysql -u root -p enter your password when prompted (It should be blank by default)
  6. create the database locally using source schema.sql (Make sure the path is correct e.g. you're in the db directory)

  7. log off by typing and entering quit

  8. seed the database

    • npm run seed
  9. Use the .env.EXAMPLE file to construct your own .env file and save that in the root of your develope folder.

If you've followed these steps correctly then the application should be good to go and can be tested using software like Insomnia Core 😁

Usage

For a video of how to test the application please follow this link

Written instructions:

  1. run the application with npm run start
  2. test the application using software like Insomnia Core

Technology

The technology used for the development of this app was:

JavaScript

NodeJS

Express.js

MySQL

Sequelize

dev-dependencies:

dependencies:

Features

  • Use environment variables to login to a development database
  • Seed the database using a npm script
  • Perform CRUD operations using API

Credits

🙏 Made with the help of:

License

License: MIT

MIT License

Contribution Guidelines

I'm open to have anyone jump in and contribute just message me on twitter

Guidelines for contributing

Feedback

Ask Me Anything Gmail

TheInfamousGrim

Any feedback please email George Fincher

GitHub: TheInfamousGrim

Twitter: GrimFunk

About

A backend for an e-commerce site

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •