A basic Hacker News reader application for exceptionally impatient users, developed in the context of a programming challenge for Doist.
Before launching the development server or building a production distribution for deployment, project dependencies must first be installed:
# npm
npm install
# Yarn
yarn install
To run the development server with hot module reloading but without offline capabilities:
# npm
npm start
# Yarn
yarn start
Open your favorite browser and go to https://localhost:1234
.
The Hacker News API is only served over HTTPS, and requests from an insecure HTTP origin (e.g., local development server) are blocked. To overcome this limitation the local development server is started with a self-signed certificate generated by Parcel. You might have to configure your browser to allow self-signed certificates for localhost
.
To run all unit tests and output a coverage report:
# npm
npm test
# Yarn
yarn test
To build a distribution ready for production with minified assets, hashed resources, and a service worker with offline capabilities:
# npm
npm run build
# Yarn
yarn build
A live demo with offline capabilities was deployed to Vercel and is available at:
- Implement unit tests for the
useIntersectionObserver
React hook - Implement integration tests for the infinite scroll behavior
This application was built on core technologies such as React - a JavaScript library for building user interfaces - and TypeScript - a typed superset of JavaScript that compiles to plain JavaScript. More tools and libraries were used during development, including, but not limited to:
- Parcel: Blazing fast, zero-configuration web application bundler
- Tailwind CSS: A utility-first CSS framework for rapidly building custom designs
- Testing Library: Simple and complete testing utilities that encourage good testing practices
- Workbox: JavaScript Libraries for adding offline support to web apps
The use of this source code is governed by an MIT-style license that can be found in the LICENSE file.