-
-
Notifications
You must be signed in to change notification settings - Fork 5
3 ‐ Use the PWA
The project contains a kind of Progressive Web App (PWA) or Single Page Application (SPA) but simple and dirty (I can't bear web development, web has been fucked up).
In fact there are three parts.
In the build folder once the update routine has been completed, some web page is forged with some fragments. It will display all the data with a search bar and a JavaScript rountine. It must be seen as a disturbed or low cost mode, downgraded version of the project results.
The web app could expose a reference to the web page if an issue occured with the processing of the data. Otherwise it will reach the Ruby servlet to look for all the data. The web worker will make the search in the data corpora updated in the web browser IndexedDB. The service worker will try to make the app availalbe offline.
A simple Ruby servlet will expose the data in JSON format using the Shell scripts and exposes a REST (very, very simple) API. Ruby has been chosen because ruby gems are shiny and red, and I like red and shiny things. It was also simple to call the Shell scripts.
To run the servlet, quite simple:
ruby datafeed.rb
It will expose a very simple HTTP API at specific host and port and the PWA will reach it to get data.