You can find the live version at veloroute.hamburg. It is updated once per week.
Building this projects has two steps:
- the frontend, using yarn/webpack
- fetching fresh Geodata from OSM, using a Ruby script
Dockerfile on how each steps work exactly and which dependencies are required.
The quickest way to a working copy is to run
./build.sh # or with brotli/gzip static compression PRODUCTION=yes ./build.sh # or running all test suites TEST=yes ./build.sh
and have all artifacts be statically compiled into
build/, which can then be served a webserver of your choice.
To get live reload, first build the dependencies as shown above. If you have setup Ruby locally, you can instead:
./routes/update_relations.rb # essentially makes "build" in the directory structure optional, to match with the URLs ln -s . build
Webpack is configured to serve static assets from the build directory. To run a development server, use:
npm run start:dev
There are only some basic tests for backend. You can run them with
bundle exec rspec
To run the link checker and other tests that require a network connection, add
bundle exec rspec --tag integration