You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This application is the back end of an e-commerce site. Express.js API is configured to use Sequelize to interact with a MySQL database.
Installation
Clone the repository. Node.js and MySQL needs to be installed in your computer. Once the repository is cloned, install dependencies.
This is done by running the following in your terminal:
npm install express
npm install sequelize
npm install mysql2
npm install dotenv
Usage
Upon installing the dependencies, you will also need to place a .env file in the root directory of the project in order to connect to your MySQL database. Example:
DB_NAME=library_db
DB_PASSWORD=
DB_USER=root
Run the following commands in your terminal:
1. mysql -u root -p
2. source db/schema.sql
3. quit
4. npm run seed
5. npm start
Contributing
Please refer to contact details if you would like to contribute to the project.