- Start Redis server
redis-server --loglevel verbose
- Start application
./mvnw test spring-boot:run
- Open Swagger
- Save traffic links
curl -X POST "http://localhost:8080/visited_links"\
-H "accept: */*" -H "Content-Type: application/json"\
-d "{ \"links\": [ \"https://ya.ru\", \"https://ya.ru?q=123\", \"google.com\", \"https://stackoverflow.com/questions/11828270/how-to-exit-the-vim-editor\"]}"
response
{"status":"ok"}
- Query unique domains
curl -X GET "http://localhost:8080/visited_domains?from=$(( `date +%s` - 60))&to=$(( `date +%s`))" -H "accept: */*"
response
{"domains":["ya.ru","google.com","stackoverflow.com"],"status":"ok"}