Skip to content

Latest commit

 

History

History

frontend

Frontend

Bootstrapped with create-react-app. A leaflet app with a plotly windrose and grommet components.

From the backend I get data points which cover 1°-lat x 1°-lng. So, that's the smallest area I can use for showing winds. This is shown to the user with a rectangle. As the user zooms out, the area is increased. At the equator the smallest rectangle is 3600M^2 big and is layed out at -0.5° to +0.5° lat-lng from where the user clicked. Further away from the equator meridians move closer together. I compensate for that when drawing the rectangle with factor cos(lat).

Currently got this problem, so:

NODE_OPTIONS=--openssl-legacy-provider yarn start

Deploy

Currently trying out cloudflare pages for deployment. I followed the getting startet tutorial almost exactly:

  1. Connect github account to cloudflare pages
  2. Configured the deployment (I used /frontend as root dir and yarn build as build command and set environment variable NODE_VERSION=16.15.0)
  3. Run first deploy (>4min)
  4. Add custom domains (prevailing-winds.de, www.prevailing-winds.de). Will enter CNAMEs automatically.
  5. Set TLS policy to strict