The application uses Vite's environment variable system:
.env.example- Template showing all available variables (tracked in git).env- Base configuration with defaults for development (git-ignored, create from.env.example).env.production- Production overrides (git-ignored, optional)
-
Copy the example file to create your local configuration:
cp src/.env.example src/.env
-
.envprovides default values optimized for development (static data, OSM tiles) -
When running
npm run build, Vite automatically loads.env.productionif it exists, overriding values from.env -
Typically these values need to be overridden for production:
VITE_USE_STATIC_DATA- Switch from static test data to live GeoServerVITE_TILE_SERVER_URL_TEMPLATE- Switch from OSM to production tile cacheVITE_BASE_PATH- Set deployment subdirectory if needed
Start a local development server:
npm run devOpen the application in a web browser.
npm run build npm run build:releaseUpload generated ZIP/GZIP to GitHub as part of creating a new release.