Skip to content

PFZM/E-Commerce-Back-End

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README - E-Commerce Back End

License: MIT

Link to see the deployed application:

YouTube video

Description

This is a Back end application for an e-commerce site. The application is build with Node.Js and uses the MySQL2 and Sequelize packages to connect your Express.js API to a MySQL database and the dotenv package to use environment variables to store sensitive data.

Table of contents:

  1. Installation
  2. Usage
  3. License
  4. Contributing
  5. Questions

Installation

  1. Fork repository
  2. Clone repository to local environment.
  3. Node.js must be installed.
  4. To install all the dependencies (dotenv, express, mysql2 and sequelize) use the following command:
npm install

5.Use the .env file to store sensitive data: MySQL username, password, and database name.

  1. Loging into MySQL and use the schema.sql file in the db folder to create your data base with the following MySQL shell command:
source db/shema.sql;
  1. Seed the database with the following command:
npm run seed

Usage

The application is invoked by using the following command (on the directory containing this project):

node server.js
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

License

This project is covered under the MIT license.

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change. Please note we have a code of conduct, please follow it in all your interactions with the project. Contributions follow the Contributor Convenant.

Questions

GitHub profile

Contact Me - Email

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published