A project that consumes the HackerNews API periodically(5 minutes) saves the content to a databases, exposes API endpoints for easy consumption and gives an interface for browsing the saved objects.
Originally for a code test for a job application.
- Have Python Installed
- Have redis Installed
- Get redis running with
sudo service redis-server start
redis-cli
- Navigate to the Project Directory
- Activate a Python virtual environment
- run
pip install -r requirements.txt
in terminal - run
celery -A QuickCheckProject beat
- Open another terminal and run
python manage.py runserver
The Project should be up and running at this point
- All routes are relative to the base url
http://127.0.0.1:8000/ : The base url has a list of recent stories, both pulled from Hacker news and created on the API
http://127.0.0.1:8000/story/{story_id}/: The detail page Containing the detail of a story and its descendants(comments etc) can be reached by clicking on a story title on the Story List Page
The Search and filter functionalities can be accessed from the navigation bar
Documentation to the api can be found here