/E-Commerce-Back-End

Back end for an e-commerce site. Reconfiguring a working Express.js API to use Sequelize to interact with a MySQL database.

Primary LanguageJavaScript

E-Commerce Back-End

The task for this project was to build the back end for an e-commerce site by modifying starter code. A working Express.js API was configured to use Sequelize to interact with a MySQL database.

Technologies used include javascript, node.js, express.js, mysql and sequelize.

The acceptance criteria were as follows:

GIVEN a functional Express.js API
WHEN I add my database name, MySQL username, and MySQL password to an environment variable file
THEN I am able to connect to a database using Sequelize

WHEN I enter schema and seed commands
THEN a development database is created and is seeded with test data

WHEN I enter the command to invoke the application
THEN my server is started and the Sequelize models are synced to the MySQL database

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 database

A screenshot of the routes being tested in Insomnia is visible below: screenshot of GET route for all categories being tested in Insomnia

A walkthrough video is available to view here: https://youtu.be/OhpH-_W1i2s

Licence: MIT

Contact me: emckibben@hotmail.co.uk