E-Commerce Back End
Back end for an e-commerce
The application is a functional Express.js API utilising Sequelize to interact with MySql database
Fields and rules have been set with Sequelize to create associations between the tables
The user is able to,
Get all
Categories including the associated Product data
Products including the associated Category and Tag data
Tags including the associated Product data
Get a single
Category including the associated Product data
Product including the associated Category and Tag data
Tag including the associated Product data
Create a single
Category
Product
Tag
Update a single
Category
Product
Tag
Delete a single
Category
Product
Tag
If there is no package.json install one by running npm init
.gitignore added to include node_modules and .env
express: ^4.17.1
sequelize: ^5.21.7
mysql2: ^2.1.0
dotenv: ^8.2.0
In the terminal run "mysql -u root -p" and enter your password
run "SOURCE db/schema.sql" this ensures the user is using the ecommerce_db
When the application is running on localhost:3001 open Insomnia to check the backend
Include associated Products data
/api/categories
Include associated Products data
/api/categories/:id
/api/categories
Include the category_name in the body
/api/categories/:id
/api/categories/:id
Include associated Products data
/api/tags
Include associated Products data
/api/tags/:id
/api/tags
Include the tag_name in the body
/api/tags/:id
/api/tags/:id
Include associated Products and Tag data
/api/products
Include associated Products and Tag data
/api/products/:id
/api/products
Include, product_name: price: stock: tagIds:
/api/products/:id
/api/products/:id
Please refer to the licence in the repo.