History service stores the records of each user and makes meaningful calculations out of these records.
Run cd history-services from the root of the project.
Run npm install to install dependencies
Ensure that environment variables are set.
- After installing dependencies, run
npm run devto start the application. - The service should be started on http://localhost:8003.
Run npm run test to execute tests. Tests depend on the deployment URL in the environment variables.
GET request to /api/history/records/:username
POST request to /api/history/records/:username
Example request body:
{
"questionName": String,
"firstUsername": String,
"secondUsername": String,
"startedAt": String,
"questionDifficulty": String,
"duration": Number;
}
GET request to /api/user/completed/:username
GET request to /api/history/completed/difficultyCount/:username
GET request to /api/history/completed/monthCount/:username
GET request to /api/history/experience/:username