This is a template repository for CS3219 project.
After setting up the environment variables and installing all the package dependencies for the 6 services, a convenient way to run all the 6 services and the frontend concurrently is as follows:
- From the root directory,
cd PeerPressure - Install npm packages using
npm i. - Run
npm run dev.
- Rename
.env.samplefile to.env. - Create a Cloud DB URL using Mongo Atlas.
- Enter the DB URL created as
DB_CLOUD_URIin.envfile. - Enter "PROD" as the value for
ENVin.envfile. - Enter
JWT_SECRETin.envfile. Eg it can be generated fromrequire('crypto').randomBytes(64).toString('hex'). - Install npm packages using
npm i. - Run User Service using
npm run dev.
- Rename
.env.samplefile to.env. - Create a Cloud DB URL using Mongo Atlas.
- Enter the DB URL created as
DB_CLOUD_URIin.envfile. - Enter "PROD" as the value for
ENVin.envfile. - Enter
JWT_SECRETin.envfile. Eg it can be generated fromrequire('crypto').randomBytes(64).toString('hex'). - Install npm packages using
npm i. - Run User Service using
npm run dev.
- Rename
.env.samplefile to.env. - Create a Cloud DB URL using Mongo Atlas.
- Enter the DB URL created as
DB_CLOUD_URIin.envfile. - Enter "PROD" as the value for
ENVin.envfile. - Install npm packages using
npm i. - Run Collaboration Service using
npm run dev.
- Rename
.env.samplefile to.env. - Create a Cloud DB URL using Mongo Atlas.
- Enter the DB URL created as
DB_CLOUD_URIin.envfile. - Enter "PROD" as the value for
ENVin.envfile. - Enter the Redis URL created as
REDIS_CLOUD_URIin.envfile. - Install npm packages using
npm i. - Run Question Service using
npm run dev.
- Rename
.env.samplefile to.env. - Create a Cloud DB URL using Mongo Atlas.
- Enter the DB URL created as
DB_CLOUD_URIin.envfile. - Enter "PROD" as the value for
ENVin.envfile. - Install npm packages using
npm i. - Run History Service using
npm run dev.
- Install npm packages using
npm i. - Run Communication Service using
npm run dev.
- Install npm packages using
npm i. - Run Frontend using
npm start.
- cd into the service
- Enter the DB TEST URL created as
DB_TEST_URIin.envfile. - For matching service only: make sure question and history service is running
- Run tests using
npm run test