Skip to content

nx-js/hackernews-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hacker News example

Live demo

A Hacker News clone built with NX, which features client-side routing, real-time updates and animations.

Usage

Clone the repo and run npm i and npm start. The npm start command bundles the source and starts a local server. The demo is exposed on localhost:3000.

Project structure

The project is structured in the following way.

  • The src folder includes the API and the components of the app.
  • The source is bundled with Webpack. You can find the webpack config in src.
  • bundle.js is the app's source and NX - bundled together by webpack.
  • index.html imports the bundled source script and has a single <hacker-news> component in its body, which is the root component.
  • server.js is only used for local testing, as the page is hosted on Github Pages. It serves as a simple server example for single page applications.