This project requires Docker and Make to manage the setup, starting the application, and interacting with it through specific commands.
- Docker: Ensure that Docker is installed and running on your machine.
- Make: Ensure that
makeis installed on your system.
To set up the PostgreSQL database using Docker, run the following command:
make setup/dbTo start the application, you can use the following command:
make startBy default, the application will start on port 9000. If you want to use a different port, you can specify it like this:
make start PORT=8080make get-leaderboardThis defaults to
make get-leaderboard LIMIT=5it runs curl -s -X GET http://localhost:9000/v1/leaderboard?limit=5 "Accept: application/json"
You can specify number of authors (N) in leaderboard by like this using LIMIT.
make get-leaderboard LIMIT=10make get-commitsThis defaults to
make get-commits REPO=chromium/chromiumit runs curl -s -X GET "http://localhost:9000/v1/commits?repoName=chromium/chromium&limit=5" -H "Accept: application/json"
If you want to get the commits for a different repository, you can specify the repository like this:
make get-commits REPO=mozilla/gecko-devReset the database by running
make setup/dbadd date in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ to start command
make start SINCE="2023-08-19T04:28:03Z"- Please make sure you have
make startrunning in a different terminal before runningmake get-commitsormake get-leaderboardin a second terminal - running
make get-commits REPO=mozilla/gecko-devwill start tracking<mozilla/gecko-dev>if it is not tracking - To track a new repo run
make get-commits REPO=owner/name
make: [*] Error 7- Please make sure you are using the same PORT value in the flag for both themake startandmake get-commitandmake get-leaderboardExamplemake start PORT=8080make get-commits REPO=chromium/chromium LIMIT=5 PORT=8080make get-leaderboard LIMIT=5 PORT=8080