MKT-KANEO-22: Fix stats service port binding #38

Merged
backmeupplz merged 1 commit from mkt-22-restore-stats-endpoints into master 2026-05-21 17:14:13 +00:00
backmeupplz commented 2026-05-21 16:39:32 +00:00 (Migrated from github.com)

Kaneo

MKT-KANEO-22

Summary

  • bind the Koa app to process.env.PORT with the existing 1339 local fallback
  • add regression coverage for public /stats, /stats/:project, /count, and /arr controller payloads
  • document the optional PORT deployment variable
  • rebase onto current origin/master after #39 landed

Validation

  • yarn test - passed, 7 suites / 52 tests on 2026-05-21 after rebase
  • git diff --check origin/master...HEAD - passed
  • PORT=3139 node dist/app.js with local curl proof:
    • curl -sSI http://127.0.0.1:3139/count -> HTTP 200 JSON
    • curl -sSI http://127.0.0.1:3139/stats -> HTTP 200 JSON

Live Endpoint Status

  • Reproduced before fix: https://stats.borodutch.com/count and /stats returned HTTP/2 404 HTML at 2026-05-21 09:35 PDT.
  • Rechecked after rebase/push at 2026-05-21 10:08 PDT: both live endpoints still return HTTP/2 404 HTML because this PR has not been merged/deployed yet.
  • Local code serves the endpoints correctly; the live failure appears deployment/runtime routing related, most likely the service not binding to the platform-provided port. Live verification still needs to happen after merge/deploy.
## Kaneo MKT-KANEO-22 ## Summary - bind the Koa app to `process.env.PORT` with the existing `1339` local fallback - add regression coverage for public `/stats`, `/stats/:project`, `/count`, and `/arr` controller payloads - document the optional `PORT` deployment variable - rebase onto current `origin/master` after #39 landed ## Validation - `yarn test` - passed, 7 suites / 52 tests on 2026-05-21 after rebase - `git diff --check origin/master...HEAD` - passed - `PORT=3139 node dist/app.js` with local curl proof: - `curl -sSI http://127.0.0.1:3139/count` -> HTTP 200 JSON - `curl -sSI http://127.0.0.1:3139/stats` -> HTTP 200 JSON ## Live Endpoint Status - Reproduced before fix: `https://stats.borodutch.com/count` and `/stats` returned HTTP/2 404 HTML at 2026-05-21 09:35 PDT. - Rechecked after rebase/push at 2026-05-21 10:08 PDT: both live endpoints still return HTTP/2 404 HTML because this PR has not been merged/deployed yet. - Local code serves the endpoints correctly; the live failure appears deployment/runtime routing related, most likely the service not binding to the platform-provided port. Live verification still needs to happen after merge/deploy.
Sign in to join this conversation.
No description provided.