This project is an ASP.NET Core Web API that retrieves the top n best stories from Hacker News, sorted by score. It implements caching to improve performance and reduce the load on the Hacker News API.
- Ensure you have .NET SDK installed (version 8.0).
- Clone the repository to your local machine.
- Navigate to the project directory in your terminal.
- Run
dotnet restoreto install required packages. - Run
dotnet runto start the application. - Access the API at
https://localhost:5001/api/stories/{n}, replacing{n}with the number of stories you want to retrieve.
- The Hacker News API's rate limits are not publicly documented, so a conservative caching strategy was implemented.