A simple Progressive Web App (PWA) which shows news feed by fetching data from the popular Hacker News API. The application was built using:
- Angular 6.0
- Angular Material (@angular/material)
- Flexbox and media queries for achieving responsive web design
- Workbox (For caching data with service worker)
- Hacker News API
Watch it live here: Hacker News PWA
This project was generated with Angular CLI version 6.0.0.
- It's a Progressive Web App (PWA) which utilizes Offline First techniques and app-like behaviour. Feel free to refresh the page when offline and see the cached data at work. The best way to learn about a new technology is to build a project out of it.
- This application follows modern Responsive Web Design techniques with the help of flexbox and media queries to provide a responsive design according to content of the site and not according to different device sizes with fixed width only.
- This project was built as a part of PWA Challenge for Google Udacity Challenge Scholarship for Mobile Web Specialist track.
The screenshots only give a brief overview of the application's responsive design.
Run the following commands:
git clone https://github.com/anurag-majumdar/hacker-news-PWA.git
cd hacker-news-PWA
npm install
Run ng serve --aot
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
To build the app with service worker support please follow the steps:
- Run
npm run workbox-build
. This is a custom npm script which runsng build --prod
andworkbox generateSW
to create adist
directory and generate the service worker filesw.js
and put it insidedist
directory.
npm run workbox-build
- To see the application at work from
dist
directory, run the following commands:
npm install -g serve
cd dist
serve -p 8080
- Add user details page for each user.
- Add comments page for each project.
Feel free to fork this repo and send me a Pull Request if you find any bug or want to extend the functionality of this app. Also, use the issues section to post any issues if you find them.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI README.