Sign inSign up

milkyware/towerbridge

By milkyware

•Updated 22 days ago

Image
0

8.8K

milkyware/towerbridge repository overview

⁠TowerBridge API

A small Web API to test out HtmlAgilityPack⁠. The idea of creating the API was suggested by a tutor I once had in that the tower bridge can affect commutes but they offer no API to retrieve the data. They do however post of table of bridge lifts which the API screen scrapes

⁠Contents

⁠Description

The API loads the bridge lift timetable from Tower Bridge bridge lifts⁠ and then builds an array of bridge lift times. Microsoft's in-memory caching has also been used to improve performance.

Each bridge lift exposes its date, vessel, vesselType (for example Paddle Steamer) and direction (UpRiver, DownRiver or Unknown).

⁠Docker

docker run -d -e TOWERBRIDGE__CACHINGEXPIRATION=01:00:00 -p 8080:8080 milkyware/towerbridge:latest

⁠Configuration

Environment VariableTypeDefaultDescription
TOWERBRIDGE__CACHINGEXPIRATIONTimespan01:00:00How long to cache the bridge lift timetable

⁠Logging

For logging, the Serilog⁠ framework has been used to allow pushing logging events to various sinks. The current installed sinks are:

Serilog.Settings.Configuration⁠ has also been added to allow configuring serilog from appsettings.json or environment variables. By default the console and file sinks are enabled with the file logs being written to daily rolling log file at /logs/log.txt

⁠References

Tag summary

Content type

Image

Digest

sha256:684d4e812…

Size

65.5 MB

Last updated

22 days ago

docker pull milkyware/towerbridge