Duplicate the .env.sample file and rename it to .env, fill in the missing values.
For question service (./question-service/.env.sample):
ENV=PROD
DB_CLOUD_URI=<MongoDB Atlas URL>
For question service's scraper (./question-service/scraper/.env.sample):
DB_CLOUD_URI=<MongoDB Atlas URL>
# Navigate to the scraper directory
cd question-service/scraper
# Scrape questions from LeetCode and store to MongoDB
# Parameters will default to 200 if not provided
python main.py <NUMBER_OF_EASY_QUESTIONS> <NUMBER_OF_MEDIUM_QUESTIONS> <NUMBER_OF_HARD_QUESTIONS>To run question-service independently (i.e. without other services running), run the following commands:
Navigate to the ./question-service directory
# Install dependencies
npm i
# Run question-service
npm run dev
# Run test
npm run test