Skip to content

feat: emit public/health.json at build time#15

Merged
AquiGorka merged 1 commit into
mainfrom
feat/health-endpoint
May 13, 2026
Merged

feat: emit public/health.json at build time#15
AquiGorka merged 1 commit into
mainfrom
feat/health-endpoint

Conversation

@AquiGorka

Copy link
Copy Markdown
Contributor

Summary

  • Adds a writeHealthJson() helper to src/build.ts that writes public/health.json containing {status, service, version} — mirroring the shape returned by backend /api/v1/health.
  • Version is read from deno.json at build time (same source __APP_VERSION__ derives from), so the deployed bundle exposes its version at https://<frontend>/health.json without any SPA changes.
  • The existing aws s3 sync public/ s3://... deploy step uploads the new file wholesale — no workflow change needed.
  • health.json added to .gitignore (build artifact, alongside app.js/styles.css).
  • deno.json patch bump 0.2.9 → 0.2.10 so auto-tag publishes a release containing the new file.

Part of the "single-shot deploy-tag-drift checker" line of work — Phase 2 will land a verify-deploy.sh in local-dev that probes this endpoint against the repo's latest git tag.

Test plan

  • deno task check — type-check passes
  • deno task build — emits public/health.json with shape {"status":"ok","service":"network-dashboard","version":"0.2.10"}
  • After merge + deploy, curl https://network.moonlightprotocol.io/health.json and curl https://network-testnet.moonlightprotocol.io/health.json return the expected JSON

Adds a small build step that writes public/health.json containing
{status, service, version}, mirroring the shape returned by backend
/api/v1/health. The static file is uploaded to Tigris via the existing
'aws s3 sync public/' step in deploy.yml, so the deployed bundle exposes
its version at https://<frontend>/health.json without any SPA changes.
@AquiGorka AquiGorka merged commit cfdd945 into main May 13, 2026
5 checks passed
@AquiGorka AquiGorka deleted the feat/health-endpoint branch May 13, 2026 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant