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
.env
to 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.sh
If an error
permission denied: ./run_all_containerized_services.sh
occurs, please run
chmod a+x run_all_containerized_services.sh
before 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 down
ordocker-compose down
(for Windows)
-
Add a file named
.env
to 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
.env
to 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
.env
to matching-service directory (i.e.,./backend/matching-service
), with the following content:PORT=8002
Fill in it with your own environment variable values.
-
Add a file named
.env
to collaboration-service directory (i.e.,./backend/collaboration-service
), with the following content:PORT=8003
Fill 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.sh
If an error
permission denied: ./run_all_services.sh
occurs, please run
chmod a+x run_all_services.sh
before running the script.
To stop all services, press
Ctrl + C
. -
If you are running on Windows:
-
run
npm install
for all backend services. -
Change to the
/backend
directory, and run:npm start
. -
Then change to the
/frontend
directory and run:
npm install npm start
- To stop all services, press
Ctrl + C
in all service directories.
-
Now the frontend can be viewed at http://localhost:3000
.