A Hacker News clone built with NX, which features client-side routing, real-time updates and animations.
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
.
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.