E-commerce application focusing on Backend.
E-commerce is a type of business that is highly on demand right now. Backend portion of this app allows the user to keep track, modify (update, create, delete) of the product stocks.
The following installations are required to run the application.
To connect Express.js API to a MySQL database.
npm install -save mysql
npm install sequelize
To use environment variables to store sensitive data (for example; MySQL username, password, and database name).
npm install dotenv
There are two parts where we will be operating on. The process starts in the terminal by using the following command line.
To create the schema from the MySQL shell.
mysql -u root
source schema.sql;
To seed the database.
npm run seed
To start the applications server
npm run watch
OR
nodemon server.js
Once the server is connected the data for each routes can be tested in Insomnia API and will be displayed in a formatted JSON.
Example of data testing in product routes.
My instructor Mr.Anthony Cooper and Slack Learning Support Team.
You can click the following link for the walkthrough video of the e-commerce backend application.