This repository contains the Backend code for the StudySync Application.
Before you begin, ensure you have met the following requirements:
- Node.js installed on your local machine.
- npm or yarn package manager installed.
- SQL database management system installed (e.g., MySQL, PostgreSQL).
To set up the project, follow these steps:
-
Clone the repository to your local machine:
git clone https://github.com/your-username/StudySync.git
-
Navigate to the project directory:
cd Backend -
Install the dependencies:
npm install
-
Create a
.envfile in the root directory and specify your environment variables. Here's an example:DB_HOST=localhost DB_USER= <Your connection username> DB_PASSWORD= <Your connection password> DB_PORT=3306Replace the values with your specific database configuration.
-
Initialize the SQL database:
- Run the SQL scripts provided in the
Datafolder to create the necessary tables and schema. - You can use a database management tool like MySQL Workbench or command-line tools to execute the script.
- Run the SQL scripts provided in the
To run the backend server, use the following command:
node app.jsThe server will start running on the port specified in the app.js file, which is http://localhost:3003.
You should now have the Backend Up and Running!