[object Object]

← back to Astek Landing

Add unauthenticated /healthz (pre-auth) for deploy smoke + monitors; point .deploy.conf HEALTH_URL at it

c341fa6ee669d123cd4ca97fa4f0e4e7a597e932 · 2026-07-02 15:47:52 -0700 · Steve

Files touched

Diff

commit c341fa6ee669d123cd4ca97fa4f0e4e7a597e932
Author: Steve <steve@designerwallcoverings.com>
Date:   Thu Jul 2 15:47:52 2026 -0700

    Add unauthenticated /healthz (pre-auth) for deploy smoke + monitors; point .deploy.conf HEALTH_URL at it
---
 .deploy.conf | 2 +-
 server.js    | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/.deploy.conf b/.deploy.conf
index 30d4866..09194a6 100644
--- a/.deploy.conf
+++ b/.deploy.conf
@@ -1,5 +1,5 @@
 # astek-landing deploy config (GATED — do not run without Steve's approval)
 PROJECT_NAME="astek-landing"
 DEPLOY_PATH="/root/Projects/astek-landing"
-HEALTH_URL="https://astek.designerwallcoverings.com/api/products"
+HEALTH_URL="http://localhost:9944/healthz"
 PORT="9944"
diff --git a/server.js b/server.js
index 6fb1314..b67f3b8 100644
--- a/server.js
+++ b/server.js
@@ -12,6 +12,9 @@ const DATA = path.join(__dirname, 'data', 'products.json');
 const app = express();
 app.use(require('compression')());
 
+// Unauthenticated health probe (deploy smoke test + uptime monitors) — BEFORE the auth gate.
+app.get('/healthz', (_req, res) => res.json({ ok: true, products: SNAP.products.length, dataMtime: LAST_REFRESH }));
+
 // HTTP Basic Auth — internal-only gate (username + password). Override via
 // BASIC_AUTH="user:pass"; defaults to the DW standard admin / DW2024!.
 const [AUTH_USER, AUTH_PASS] = (process.env.BASIC_AUTH || 'admin:DW2024!').split(':');

← 5dcfb53 data: products.json rebuild snapshot (session close — public  ·  back to Astek Landing  ·  auto-save: 2026-07-02T15:48:57 (1 files) — data/products.jso b33f89a →