The purpose, the motivation, the execution:
This application was created to allow internet retailers to utilize a MySQL database and keep an up to date record of specific categories, products, and tags that relate to the sale and inventory of their business. This application uses Sequelize to interact with the MySQL database by providing an object-relational-map that sequalize can depend on rather than being limited only to SQL queries. This helps to separate the application code into more managable pieces of code that can be reused and helps to isolate any bugs.
-
Steps required to install project and how to get the development environment running:
You can clone the repository to you local hard drive. Open the project in VS Code, if you do not have VS code you must install it. Navigate to the project folder within the terminal and run
npm init -y
to initialize your node environment and create a package.json where the project will be stored. Next use the terminal to execute the commandnpm i
to install the project dependencies.After all dependencies have been installed you will need to create your .env file within the root directory of your repository. This will contain your environmental variables specifying the database name, your MySQL username, and your MySQL password. This will need to be completed before running the application, and will allow the connection.js file to utilize your environmental variables which will keep sensiitive login information safe.
To create the database for the project you will need to navigate to the project file containing the schema.sql file. Once there you will need to open a MySQL shell and run the command
source schema.sql
. Once the database is created you will need to navigate to the root directory to seed the database with the following command:npm run seed
. After this command is sucessfully executed you can run the commandnpm start
to start the application.Instructions and examples for use:
Once the application is started, the user can utilize an api platform such as Postman or Insomnia to hit the api enpoints and execute the various functions within the aapplication. A demonstration of the applications functionality is shown below.
This project is covered under the MIT License license.
For any questions or concerns, feel free to contact me using the information below:
GitHub: @dpprdgls