Skip to content

This application serves to connect a user with a variety of products, stored in a mock database and accessed via local routing. This functionality allows a user to create, search, update and delete products, as well as their associated categories and tags. Demonstrative of Object-Relational-Mapping.

License

Notifications You must be signed in to change notification settings

Zachattack221/orm-ecommerce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

orm-ecommerce

Table of Contents

  1. Description
  2. Technology
  3. Installation
  4. Visuals
  5. License

Description

This application serves to connect a user with a variety of products, stored in a mock database, and accessed via local routing. The functionality allows a user to create, search, update and delete products, as well as their associated categories and tags.

Demonstrative of the object-relational mapping method of data management. Useful in an e-commerce setting with a more defined set of data values and relationships (defined via api routing, and model based organization). Using a RESTful API structure, this application is able to perform GET, POST, PUT, and DELETE requests to find and manipulate stored data in the generated e-commerce database.

Technology

This application leverages the following npm packages:
Dotenv as a zero-dependency module that loads environment variables from a .env file into process.env. Storing configuration in the environment separate from code.
Express as a web framework for node.js
Mysql2 and Sequelize are used to connect the application to a MySQL database, allowing a user to successfully create, read, update, and delete information within the database. Functionality of the api requests is demonstrated via Insomnia in the following video:
Video Walkthrough

Installation

Run 'npm i' within the console, located at the root level of the directory. This will pull in the necessary node modules/packages.

Following the package install, run "mysql -u root" to open sequel terminal, then enter "SOURCE db/schema.sql" to establish our database in use (ecommerce_db). From this point please "exit" sequel shell.

Once database is created, enter "npm run seed" within the terminal to seed the content from the seeds folder.

Lastly, enter "npm run start" in the console. This will open a port at localhost:3001, accessible when 'localhost:3001' searched in browser, or when opened via Insomnia as demonstrated in the video link provided above.

Visuals

Functionality and usage demonstrated via Insomnia based queries:

Categories Categories Products Products Tags Tags

License

This application is licensed with the MIT License.

About

This application serves to connect a user with a variety of products, stored in a mock database and accessed via local routing. This functionality allows a user to create, search, update and delete products, as well as their associated categories and tags. Demonstrative of Object-Relational-Mapping.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published