[object Object]

← back to Stars of Design

sod /api discovery — list /api/health + smoke +2 /api/health checks. 54/54.

c0ba760504b1e164d1e0af810fbf23d9a89932b1 · 2026-05-13 08:45:52 -0700 · Steve Abrams

Files touched

Diff

commit c0ba760504b1e164d1e0af810fbf23d9a89932b1
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Wed May 13 08:45:52 2026 -0700

    sod /api discovery — list /api/health + smoke +2 /api/health checks. 54/54.
---
 routes/public.js | 1 +
 test/smoke.js    | 5 +++++
 2 files changed, 6 insertions(+)

diff --git a/routes/public.js b/routes/public.js
index e0077d1..626316e 100644
--- a/routes/public.js
+++ b/routes/public.js
@@ -396,6 +396,7 @@ router.get('/api', (_req, res) => {
     name: 'Stars of Design API',
     base: 'https://starsofdesign.com',
     endpoints: {
+      'GET /api/health':                 'Liveness probe (SELECT 1) — JSON ok+ts',
       'GET /api/stats':                  'Aggregate counts (designers/firms/claimed/links/likes/comments/candidates)',
       'GET /api/clients/:id/comments':   'Comments on a DW client profile (chronological)',
       'POST /api/clients/:id/like':      'Toggle like on a DW client (anonymous ID via cookie)',
diff --git a/test/smoke.js b/test/smoke.js
index 1ff3a18..f9279d1 100644
--- a/test/smoke.js
+++ b/test/smoke.js
@@ -99,6 +99,11 @@ function check(name, cond, hint = '') {
   check('api: 200',                    r.status === 200);
   check('api: discovery doc',          /endpoints/.test(r.body) && /Stars of Design API/.test(r.body));
 
+  // 8a2. /api/health
+  r = await fetch('/api/health');
+  check('api/health: 200',             r.status === 200);
+  check('api/health: ok',              /"ok":true/.test(r.body));
+
   // 8b. /api/stats
   r = await fetch('/api/stats');
   check('api/stats: 200',              r.status === 200);

← fd9f828 sod GET /api/health — mirrors asim. SELECT 1 liveness via st  ·  back to Stars of Design  ·  sod sitemap.xml + .txt Cache-Control 1h→6h + SWR 24h (mirror 6d21b22 →