E-Commerce Back End is a Node application for performing CRUD (create, read, update, delete) functions on products, product categories, and product tags in a fictional database for learning purposes. Focusing on using Sequelize to create Models, associations/relationships between Models, and creating GET, PUT, POST, and DELETE routes for API use.
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
This is a back-end application with no front-end implementation, but requires MySQL. Please ensure you have MySQL installed on your machine. For information on how to install MySQL please click here
- Clone this repository onto your machine with
git clone
- From the root directory, install dependencies with
npm install
- Open a connection to MySQL in the root directory, and create the database with
source db/schema.sql
- Return to the command line and run command
npm run seed
to seed the database with provided data
Walkthrough Videos:
Once dependencies have been installed, make a copy of the .envEXAMPLE file, drop the EXAMPLE portion in the name, and fill in the required fields with your MySQL username and password (note: username is usually root if working on your own machine):
Start the database connection and server from the command line with npm start
, then you can use a REST Client (Insomnia used in examples) to test endpoints:
Finding all Categories, Products, Product Tags:
Finding individual Categories, Products, Product Tags using ids (PrimaryKeys):
Create new instances of Categories, Products, Product Tags:
Update Categories, Products, Product Tags:
Delete Categories, Products, Product Tags using ids (PrimaryKeys):
As seen above, test API endpoints with a REST Client such as Insomnia or Postman
Contributions always welcome!
Technologies Used:
- Node.js
- Express.js
- MySQL
- Sequelize
Noteable Packages Used:
If you have any questions about the application, or would like to become a contributor, please contact me using the information below: