A Progressive Web App (PWA) example. It fetches posts from jsonplaceholder posts api and displays them. When offline it shows cached posts. You can also add to your home screen as an app.
For caching data, Dexie - an IndexedDB wrapper is used.
You can verify the requirements of PWA using chrome developer tools & lighthouse extension. Lighthouse tests if your app:
- Can load in offline or flaky network conditions
- Is relatively fast
- Is served from a secure origin
- Uses certain accessibility best practices
Lighthouse is available as a Chrome extension for Chrome 52 (and later) and a command line tool.
npx lighthouse https://sarangkartikey50.github.io/re-posts/ --view
or you can also use lighthouse chrome extension.
npm install //install all the node modules
npm start //runs the app
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.