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.
Uses the MySQL2 and Sequelize packages to connect to a MySQL database.
Uses the dotenv package to use environment variables to store sensitive data, like a user’s MySQL username, password, and database name.
Syncs Sequelize models to a MySQL database on the server start.
GIVEN a functional Express.js API,
WHEN I add my db name, MySQL username, and MySQL password to an env file,
THEN I am able to connect to a db using Sequelize.
WHEN I enter schema and seed commands,
THEN a development db is created and is seeded with test data.
WHEN I open API GET routes in Insomnia for categories, products, or tags,
THEN the data for each of these routes is displayed in a formatted JSON.
WHEN I test API POST, PUT, and DELETE routes in Insomnia,
THEN I am able to successfully create, update, and delete data in my db.
INSOMNIA (see Screenshots & Videos)
Clone the starter code:https://github.com/coding-boot-camp/fantastic-umbrella npm itit -y, npm i express, npm i mysql2, npm i sequelize, npm i dotenv.
DEMO VIDEO: Technical Criteria: Create the schema from the MySQL shell; seed the database from the command line; start the application’s server: https://drive.google.com/file/d/1kn-W2XscY0i6Cnogo1wMHzC9Sq2EAuPC/view
Walkthru testing routes for categories, products, and tags in Insomnia: GET ALL and GET BY ID routes https://drive.google.com/file/d/17C_XElLOH4mMaU1pRFxGwzLjEVDjnhRp/view
POST, DELETE and GET ALL routes https://drive.google.com/file/d/1H3szHlngf0jEtBFi6DNrtBjEEu-sTi6G/view
PUT and GET ALL routes https://drive.google.com/file/d/14xAO-uM66GrY-0Delp39BnjANq-k4UX6/view
Contact below:
Have questions? You can find me on GitHub: https://github.com/BeKind-Rewind
Or email me at: [email protected]
Licensed under the MIT license.