sasimapatterson / e-commerce-backend

13-ORM (Object-Relational Mapping)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

E-commerce-backend

E-commerce application focusing on Backend.

Table of Contents

  1. Descriptions
  2. Installations
  3. Usage
  4. Test
  5. Contributing
  6. Link

Descriptions

E-commerce is a type of business that is highly on demand right now. Backend portion of this app allows the user to keep track, modify (update, create, delete) of the product stocks.

Installations

The following installations are required to run the application.

To connect Express.js API to a MySQL database.

  npm install -save mysql

  npm install sequelize

To use environment variables to store sensitive data (for example; MySQL username, password, and database name).

  npm install dotenv

Usage

There are two parts where we will be operating on. The process starts in the terminal by using the following command line.

To create the schema from the MySQL shell.

  mysql -u root

  source schema.sql;

e-commerce MySQL shell

To seed the database.

  npm run seed

e-commerce seed

To start the applications server

  npm run watch

OR

  nodemon server.js

nodemon

Once the server is connected the data for each routes can be tested in Insomnia API and will be displayed in a formatted JSON.

Example of data testing in product routes.

Insomnia Product Routes

Contributing

My instructor Mr.Anthony Cooper and Slack Learning Support Team.

Link

You can click the following link for the walkthrough video of the e-commerce backend application.

Walkthrough Video

About

13-ORM (Object-Relational Mapping)


Languages

Language:JavaScript 100.0%