Skip to content

This is a back end e-commerce app which works with Express.js API and use Sequelize to interact with a MySQL database.

License

Notifications You must be signed in to change notification settings

SepidehAyani/orm_e-commerce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ORM: E-commerce

This is a back end E-commerce app which works with Express.js API and use Sequelize to interact with a MySQL database.

GitHub last commit GitHub code size in bytes GitHub watchers GitHub top language GitHub license

User Story

As a manager at an internet retail company, user wants a back end for their e-commerce website that uses the latest technologies, so that their company can compete with other e-commerce companies.

Table of Contents

  1. About the Project
  2. Project Links
  3. Demo
  4. Installation
  5. Contribution Guidelines
  6. Project Team
  7. Questions
  8. License

About The Project

Given a functional Express.js API:

  • When user add their database name, MySQL username, and MySQL password to an environment variable file, then they are able to connect to a database using Sequelize.
  • When user enter schema and seed commands, then a development database is created and is seeded with test data.
  • When user enter the command to invoke the application, then their server is started and the Sequelize models are synced to the MySQL database.
  • When user open API GET routes in Insomnia for categories, products, or tags, then the data for each of these routes is displayed in a formatted JSON.
  • When user test API POST, PUT, and DELETE routes in Insomnia, then user is able to successfully create, update, and delete data in my database.

Project Links

Repo Link

Demo

Demo on the followings:

- connect to a database using Sequelize
- enter schema and seed commands
- database is created and is seeded with test data
- the server is started and the Sequelize models are synced to the MySQL database

Demo on db and seed

Demo on Categories

Demo on Categories

Demo on Products

Demo on Products

Demo on Tags

Demo on Tags

Instructions

git clone https://github.com/SepidehAyani/orm_e-commerce.git
In the root directory of the project, run 'npm i' to download the dependencies.
Initiate the database with 'mysql -u root -p'.
To create tables, run 'source db/schema.sql'.
Exit the mysql terminal, and run 'npm run seed' to insert data into the tables.
Run 'npm start' to start your server.

Make sure to add a .env file to the root of the app with the following details:

DB_NAME='ecommerce_db'
DB_USER='user'
DB_PW='xxx'

Note: follow this to install MySql and setup your own username & password

Languages and libraries used in this project:

Contribution Guidelines:

Feel free to contribute to this repo by creating issues or sending an email to sepid.ayani@gmail.com

Questions

Contact sepid.ayani@gmail.com

Project Team

SepidehAyani

License

Distributed under the MIT License. See Choose A License for more details.

About

This is a back end e-commerce app which works with Express.js API and use Sequelize to interact with a MySQL database.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published