This is the ReactJS demo web app running on https://valhalla.openstreetmap.de. It provides routing and isochrones with a magnitude of options and makes requests to Valhalla, an open source routing engine and accompanying libraries for use with OpenStreetMap data.
Commands
npm install
Install the dependencies.
npm run start
Runs the app in hot-reload mode on http://localhost:3000 to view changes in the browser.
npm run build
Builds and bundles the minified app for production to the ./build folder.
Your app is ready to be deployed!
Testing
This project includes end-to-end tests using Playwright to ensure the application works correctly across different scenarios.
Unit Tests
End-to-End Tests
First install the browser(s) you want to use:
# Install all browsers npx playwright install # Or install only what you need npx playwright install chromium npx playwright install firefox
# Run all e2e tests (both chromium and firefox) npm run test:e2e # Run tests for a specific browser npm run test:e2e -- --project=chromium npm run test:e2e -- --project=firefox # Run tests with visible browser (useful for debugging) npm run test:e2e:headed -- --project=firefox # Open Playwright Test UI for interactive testing npm run test:e2e:ui
Tests automatically start the development server if it's not already running.
Get started with Docker
git clone https://github.com/nilsnolde/valhalla-app.git
cd valhalla-app
docker compose up --buildCustomization
Edit .env to manage
- Nominatim API server
- Valhalla API server
- Tile server
- Map start location