There are two ways to run our application:
- Using Docker
- Using
npm
Fisrt download or git clone our code.
-
Make sure Docker is running
-
Add a file named
.envto current directory (i.e., project root directory), with the following content:JWT_SECRET= DB_CLOUD_URI= DB_LOCAL_URI= MONGO_URL=Fill in it with your own environment variable values.
-
If you are using running on MacOS or Linux, run the bash script:
./run_all_containerized_services.shIf an error
permission denied: ./run_all_containerized_services.shoccurs, please run
chmod a+x run_all_containerized_services.shbefore running the script.
-
If you are using running on Windows, run:
docker-compose build --no-cache docker-compose up -d
-
To stop all services, run:
docker compose downordocker-compose down(for Windows)
-
Add a file named
.envto user_service directory (i.e.,./backend/user-service), with the following content:DB_CLOUD_URI= DB_LOCAL_URI= PORT=8000 ENV=PROD JWT_SECRET=Fill in it with your own environment variable values.
-
Add a file named
.envto questions_service directory (i.e.,./backend/questions_service), with the following content:PORT=8001 MONGO_URL=Fill in it with your own environment variable values.
-
Add a file named
.envto matching-service directory (i.e.,./backend/matching-service), with the following content:PORT=8002Fill in it with your own environment variable values.
-
Add a file named
.envto collaboration-service directory (i.e.,./backend/collaboration-service), with the following content:PORT=8003Fill in it with your own environment variable values.
-
Make sure RabbitMQ is running on port
5672.
-
If you are running on MacOS or Linux, change back to the project root directory and run the script:
./run_all_services.shIf an error
permission denied: ./run_all_services.shoccurs, please run
chmod a+x run_all_services.shbefore running the script.
To stop all services, press
Ctrl + C. -
If you are running on Windows:
-
run
npm installfor all backend services. -
Change to the
/backenddirectory, and run:npm start. -
Then change to the
/frontenddirectory and run:
npm install npm start- To stop all services, press
Ctrl + Cin all service directories.
-
Now the frontend can be viewed at http://localhost:3000.