This is a backend application created using Node.js, Express, Sequelize, MySQL2 and dotenv where I have used Sequelize to interact with the MySQL database and created APIs to run CRUD operations.
The project can be installed by cloning the repo from github. Once this is done run npm install to download the dependencies needed for the project. Then run the MySQL shell to create the database. Once the database is created if you are using the seed data run node seeds/seed.js from the terminal to populate the database. Then type in npm start to being the server to test the APIs. I have tested them using INSOMNIA.
The project has GET, POST, PUT and DELETE API routes for different categories, products and tags in this e-commerce store. They can all be used to carry out their relevant operation to amend or view the data in the database.
When the project is running based on the installation above and the server has been started each of the API routes for category, product and tag can be tested for their CRUD operations. I have used INSOMNIA to test them in the walkthrough video below. Please see below for an example of what one of the working API routes looks like in INSOMNIA.
-
Categories
- View all categories and any associated products
- View category by ID
- Add a category
- Update a category
- Delete a category
-
Products
- View all products
- View product by ID
- Add a product
- Update a product
- Delete a product
-
Tags
- View all tags
- View tag by ID
- Add a tag
- Update a tag
- Delete a tag
Please follow the link to watch the walkthrough video on how to use this backend
If there are any questions regarding this project please contact me through my email - dan.lawrence0810@gmail.com
Or please visit my GitHub profile which has further contact information - DanLawrence91