TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Hacker News Reader using ts-liveview

2 pointsby aabbcc1241about 3 years ago

2 comments

aabbcc1241about 3 years ago
This is a demo application implemented with ts-liveview [1]. It calls the HN APIs from a node.js server, then responses contentful HTML without further ajax calls.<p>ts-liveview adopts progressive enhancement. It works as MPA without javascript; when javascript and websocket are enabled, it upgrades to &quot;SSR-SPA&quot; mode. In the SPA mode, client-events are sent to the server via websocket. The server then derive DOM update instructions and send to the client(s) over ws.<p>In addition, since the DOM is controlled from the server, it is relative trivial to update multiple clients.<p>This approach enable interactive webapp with minimal javascript bundles to be downloaded, parsed, and executed on the client device. Since the core logic runs on the server, we can use 3rd libraries or organize the webapp as a single root top-down structure without bloating the client.<p>The demo is hosted on a rather slow VPS so it may not loads quickly. Welcome any feedback :)<p>[1] <a href="https:&#x2F;&#x2F;hn.liveviews.cc" rel="nofollow">https:&#x2F;&#x2F;hn.liveviews.cc</a>
aabbcc1241about 3 years ago
I&#x27;ve moved from a slow azure HDD server to a much faster linode SSD server. The sqlite-backed cache lookup should be much faster now :)