This project connects to the toronto public library web socket broadcasting Realtime Feed of Searches and stores the data in a postgres table.
For more info on the feed:
docker-compose up -d
Once services are up and running, view incoming data:
docker-compose logs -f -t
To explore the data, find the running container id using:
docker ps -a
Then enter the container:
docker exec -it <<YOUR_CONTAINER_ID>> psql -U postgres
Select 5 rows:
SELECT * FROM tpl_searches LIMIT 5;
The repo here has an indepth explanation of the actual socket script.