Skip to content

brstrutt/IsWorcesterUnderwaterV2

Repository files navigation

IsWorcesterUnderwaterV2

GitHub Last Commit Build and Publish

A rewrite of isworcesterunderwater.co.uk to be a static site built using Rust and Yew.

This website shows the current river levels at the river monitoring stations either side of Worcester (Barbourne and Diglis), and shows an estimate of whether or not the city is currently flooding. image

Development

  1. Clone the repo
  2. Open the devcontainer in vscode
  3. To see the site run trunk serve. This will serve the site on http://127.0.0.1:8080/IsWorcesterUnderwaterV2. This will also auto rebuild and refresh the page when you save any changes
  4. To build a release run trunk build --release. The site will be built in the ./dist directory

Publishing

  1. Push to main
  2. Github actions should build the site and push to production automatically

Tools

  • devcontainer: docker based development environment with lots of vscode integration.
  • Rust: programming language
  • Cargo: standard tool for working with Rust. Used for building/test/managing dependencies
  • Yew: Frontend library for developing webapps in Rust. Think React but for Rust
  • Trunk: Tool to make developing webapps much easier in Rust. Use this instead of Cargo for building/running the project.

Issues

  • Yew v0.21.0 is the latest version and has some issues
    • specifying properties in the index.html breaks release builds due to code optimisation failure
    • SRI needs to be turned off to avoid "this wasm file checksum doesn't match the one calculated at build time" errors

Previous version

Original implementation can be found here

About

A small website to tell me if worcester is flooding or not. Built using Rust and Yew because why not.

Resources

Stars

Watchers

Forks