Public APIs
HackerNews Node favicon

HackerNews Node

News

Api to get related articles about Node.js in Hacker News.

HackerNews Node's website screenshot

About HackerNews Node

HackerNews Node is a REST API built with NestJS that retrieves articles related to Node.js from Hacker News. It fetches and stores posts in a database via a refresh endpoint, keeping the data updated over time. The API includes JWT-based authentication, requiring a user account and access token to interact with most routes beyond the initial data population.

The project is documented through an OpenAPI/Swagger specification and includes a Postman collection for testing endpoints. It supports both Docker (via Docker Compose) and local development setups, with configuration handled through environment variables. Test coverage includes unit and end-to-end tests, and the project is built with TypeScript.

This is suited for developers looking for a source of Node.js-related discussion content from Hacker News to integrate into other applications, or for those examining it as a reference implementation of a NestJS-based REST API with authentication, database persistence, and CI/CD tooling (GitLab pipeline configuration is included).

Key features

  • REST API for fetching Node.js-related articles from Hacker News
  • JWT-based authentication with access token generation
  • Endpoint to refresh and keep the posts database up to date
  • OpenAPI/Swagger documentation for all endpoints
  • Docker and docker-compose support for local or containerized runs
  • Built with NestJS and TypeScript

Frequently asked questions

What technology stack is this built with?

It is built with NestJS and TypeScript, using GraphQL and Swagger specification.

How do I run this project?

You can run it via docker-compose (docker-compose up), or locally by installing dependencies with npm install and running npm run start:dev or start:prod.

Is there API documentation?

Yes, all endpoints are documented at GET /api/docs using the OpenAPI Specification, and a Postman collection is also included in the /docs folder.

Does it require authentication?

Yes, a user must be created to authenticate and generate an access token before interacting with most routes.

How do I populate the database initially?

You call the POST /api/posts/refresh endpoint, which fills the posts table for the first time and keeps it updated periodically.

Ad
Webz.io News API favicon

Webz.io News API

Webz.io News APIs provide global news data for search, monitoring, analytics, and AI applications, with powerful filters and natural-language search.

Learn more
Ad
SerpApi - Search API favicon

SerpApi - Search API

SerpApi's Search API makes it easy and fast to scrape Google and other search engines.

Learn more

Featured products

  • SerpApi - Search API favicon
  • Webz.io News API favicon

Show your product to thousands of developers

· 100k monthly pageviews
· 7k newsletter subscribers

Advertise your product