Requirements:
- java 17
- maven
- Go to main directory and build executable jar by running a command
mvn clean package
- Run application by command
java -jar target/github-users.jar
-
Open browser on address http://localhost:8090/users/{login}
on placeholder 'login' paste example github user login
Response:{ "id": 583231, "name": "The Octocat", "type": "User", "avatarUrl": "https://avatars.githubusercontent.com/u/583231?v=4", "createdAt": "2011-01-25 18:44:36+0000", "login": "octocat", "calculations": [ { "description": "Empik calculation", "value": 0.006163961372508733 }, { "description": "All code sources count", "value": 16 } ] }- id - identifier of github user
- calculations - list of the performed calculations with theirs descriptions
-
Every request is counted and saved into database per requested login, application is using h2 database and serving ui to perform database queries. To check database state follow below steps.
- Go to website http://localhost:8090/h2-console,
- Login into user 'users' with password 'password'
- Fetch data from suitable table by command
SELECT * FROM LOGIN_REQUESTS;