1
0
Fork
You've already forked hacker-news
0
Mobile-focused alternative frontend for Hacker News
  • Elixir 80.3%
  • HTML 7.7%
  • JavaScript 5.5%
  • Dockerfile 3.6%
  • Shell 2.4%
  • Other 0.5%
Find a file
2026年06月17日 21:19:53 +02:00
assets Simplify color selection and add light mode 2025年02月08日 17:49:56 +01:00
bin Add image name option to bin/build-container-image 2025年02月07日 23:06:40 +01:00
config Upgrade all dependencies 2026年06月17日 21:18:11 +02:00
lib Add some automatic URL rewriting 2026年06月17日 21:19:53 +02:00
priv/static Replace favicon 2025年02月04日 22:38:03 +01:00
rel/overlays/bin Add container build setup 2025年02月07日 21:58:44 +01:00
test Initial commit 2025年02月04日 22:15:03 +01:00
.dockerignore Add container build setup 2025年02月07日 21:58:44 +01:00
.formatter.exs Initial commit 2025年02月04日 22:15:03 +01:00
.gitignore Initial commit 2025年02月04日 22:15:03 +01:00
Dockerfile Upgrade all dependencies 2026年06月17日 21:18:11 +02:00
LICENSE Add LICENSE 2025年02月07日 22:40:10 +01:00
mix.exs Upgrade all dependencies 2026年06月17日 21:18:11 +02:00
mix.lock Upgrade all dependencies 2026年06月17日 21:18:11 +02:00
README.md Add README section on deploying 2025年02月07日 22:56:11 +01:00

Hacker News frontend

This provides a mobile-focused alternative frontend for Hacker News. It uses the official API, and renders HTML pages with very minimal JS.

The design of the webpages is strongly inspired by hn.premii.com.

Note that interacting with the Hacker News API to build comment pages requires a sometimes enormous number of HTTP requests. There is no rate limit, so that is fine, but loading a large page can take a while. This frontend does not include any sort of abuse prevention, but does include some caching.

Usage

To start your Phoenix server:

  • Run mix setup to install and setup dependencies
  • Start Phoenix endpoint with mix phx.server or inside IEx with iex -S mix phx.server

Now you can visit localhost:4000 from your browser.

Deploying

Can easily deployed using Podman/Docker. See the Phoenix deployment guide for other options.

Use bin/build-container-image to build a container image. By default it builds an image with the name localhost/hacker-news:<commit-id>. Add -h to see some more options.

The following environment variables are important:

  • SECRET_KEY_BASE should be set to a secret generated using mix phx.gen.secret

  • PORT can be set to the port to listen on, defaults to 4000