Secure back-end Sequelize database managing commercial products
This project integrates an API into a database with fully functioning C.R.U.D. operations, thus acting as a fully functional database for an e-commerce environment. With a tool such as this, a business owner could manage and keep track of their products and services.
To run this back-end database, please clone this repository locally to your machine.
- Be sure to install Node.js version 16 and run
npm i
in the root folder to install MySQL2, dotenv, Express, Nodemon, and Sequelize packages. - Create and adjust a .env file with environment variables to match the MySQL login config file.
- In the terminal's root folder, initialize MySQL with
mysql -u root -p
(ormysql -uroot
if you do not use a password) to log into MySQL. - Create the database with
source db/schema.sql
thenquit
from MySQL. - Seed the database with information with
npm run seed
then turn on the server withnpm run watch
. - Follow the given API routes to view, add, update, or delete information!
After opening the port locally to localhost:3001/api
, open an API client such as Insomnia or Postman to navigate through different the different routes available, which are /categories
, /products
, and /tags
.
See demonstration of how it works here!
No contributions at this time, thank you for your interest.
No testing provided at this time.
- creator: miacias
- email: [email protected]
Documentation referenced:
- Mozilla Development Network
- Stack Overflow forums
- Sequelize
Tools used:
- VS Code
- Node.js
- MySQL
- MySQL2 package
- dotenv package
- Sequelize package
- Express package
- Nodemon package
Tutor(s):
- Patrick Meehan - many-to-many Sequelize associations
U. Penn Bootcamp instructor(s):
U. Penn Bootcamp study groups:
- Josh Eflin - reviewed API Express routes
MIT