You can run this project locally using either Docker or Node.js. Follow the instructions below based on your preferred method.
-
Ensure you have Docker installed on your computer.
-
From the root directory of the project, run the following command:
docker compose up
-
Note: You have to generate the
.env
anddatabase-docker.env
files by running the provided setup script.
Follow the steps below to run the project using Node.js.
- Install Git
- Install MySQL
- Install Node.js
- Create a new folder on your computer for the project.
Clone the repository to your local machine:
git clone https://github.com/vvaibhavv11/DE_Project.git
Navigate into the project directory:
cd DE_Project
Switch to the master
branch:
git checkout master
Install the necessary dependencies using your preferred package manager:
npm install
or
pnpm install
This step is crucial for running the project. The project requires two environment files: .env
and database-docker.env
.
You can generate these files by running the setup script:
npm run GenerateEnv
During the setup, you will be prompted to enter:
- MySQL Host URL: You can type
docker
if you're using Docker, otherwise leave it blank to default tolocalhost
. - MySQL Password: This is required and cannot be left blank.
- Database Name: You can leave it blank to use the default
project
.
The script will create the .env
and database-docker.env
files with the appropriate variable with their values.
Finally, start the development server:
npm run dev
or
pnpm dev
The server should start on port 5500. Make sure this port is open and not in use by another application.
- The default MySQL user is
root
. - If you want to use the email service, remember to edit the
.env
file to include your email credentials.