An OTP application with a gen_server
process that fetch every 5 minutes the top stories from https://hacker-news.firebaseio.com/v0, and make stories available via two public APIs: JSON over http and JSON over WebSockets.
Get the stori_id
story from the 50 top stories.
Get paginated top 50 stories.
Get the top 50 stories.
Websocket that re-sends the 50 tops stories every 5 minutes.
Can be tested with next command:
$ wscat -c http://localhost:8000/top_stories/websocket
$ make deps
$ make run
$ make doc
$ make tests
- Build:
deps-docker
- Test:
tests-docker
- Run:
run-docker