Skip to content

Latest commit

 

History

History

web-app

Netlify Status

Progressive web app

Overview

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.

Getting started

  1. 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.
  2. Install node modules:
npm install
  1. Copy "config.json.example" to "config.json"
  2. Update the API URL as appropriate.
  3. Start the development web server to view the website locally
npm start

At this point you are ready to begin development.

Deploy to production

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.

Testing

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.

Customize the configuration

See the official configuration reference.