This is the user's web app for fetching weather station data from the API server and displaying it in the user's browser on their computer or mobile device. Specifically, it is a PWA (progressive web app) which is a website that can be installed as an icon on the user's home screen and accessed the same way they would a native app.
For an example on how to install PWA's such as this, see this demo.
For more information on PWA's check out this introduction and guide on web.dev.
- Install an up-to-date copy of nodejs (current or LTS both work). Preferably instead of installing node directly, install fnm which can automatically install the correct version of node for you that is specified in
.nvmrc
. This way you can guarantee you are running a compatible version of node. - Install node modules:
npm install
- Copy "config.json.example" to "config.json"
- Update the API URL as appropriate.
- Start the development web server to view the website locally
npm start
At this point you are ready to begin development.
This command compiles and minifies the source code into a static build for production:
npm run build
This will output a dist/
folder, the contents of which can be served in the public folder of production-ready HTTP server such as nginx or Apache HTTP server.
The only testing in place is a linter, which can be ran with the following command:
yarn lint
The linter also runs during development so this command isn't something you'll need to run very often.
See the official configuration reference.