The source for homebridge.io, an Angular app.
Run npm run watch for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
Run npm run build to build the project. The build artifacts will be stored in the dist/ directory.
The site is built and served by Cloudflare Pages, which builds the source branch directly. There is no deploy workflow in this repository, so every push to source publishes the live site.
Two things follow from that:
- The build output must land at exactly
dist/. That is whatoutputPathin angular.json pins with{ "base": "dist", "browser": "" }— the Angular default would put it in abrowsersubfolder, which Cloudflare would not serve. - The Node version is set by .node-version, which Cloudflare reads from the repository.
A failed build leaves the previous deploy in place, so the site goes stale rather than down.
Redirects / short URLs are managed in the ./src/public/_redirects file.
See https://developers.cloudflare.com/pages/platform/redirects/ for syntax.
./src/public/rpi-image-repo.json is written by the release workflows in homebridge-raspbian-image, and is read from its deployed URL by the Raspberry Pi Imager. Do not move the file or change the URL it is served from.