← back to build-pages
Makefile + .deploy.conf + /robots.txt + 2 smoke (parity with asim/sod)
7ebd20c526aba13f6674bee4339e7933aa295787 · 2026-05-13 12:39:49 -0700 · SteveStudio2
Files touched
A .deploy.confA MakefileM server.jsM test/smoke.js
Diff
commit 7ebd20c526aba13f6674bee4339e7933aa295787
Author: SteveStudio2 <stevestudio2@SteveStacStudio.lan>
Date: Wed May 13 12:39:49 2026 -0700
Makefile + .deploy.conf + /robots.txt + 2 smoke (parity with asim/sod)
---
.deploy.conf | 3 +++
Makefile | 43 +++++++++++++++++++++++++++++++++++++++++++
server.js | 6 ++++++
test/smoke.js | 5 +++++
4 files changed, 57 insertions(+)
diff --git a/.deploy.conf b/.deploy.conf
new file mode 100644
index 0000000..1cf223e
--- /dev/null
+++ b/.deploy.conf
@@ -0,0 +1,3 @@
+PROJECT_NAME=build-pages
+DEPLOY_PATH=/root/public-projects/build-pages
+HEALTH_URL=https://projects.agentabrams.com/healthz
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..2355490
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,43 @@
+# build-pages — common dev targets.
+# Run: make <target>
+
+.PHONY: help start dev smoke smoke-quiet smoke-json fleet-smoke fleet-status restart logs
+
+help:
+ @printf 'Targets:\n'
+ @printf ' start — node server.js (port 9700)\n'
+ @printf ' dev — same as start\n'
+ @printf ' smoke — run test/smoke.js (verbose)\n'
+ @printf ' smoke-quiet — only failures + tally\n'
+ @printf ' smoke-json — JSON output piped through jq\n'
+ @printf ' fleet-smoke — full asim+sod+build-pages smoke (~215 checks)\n'
+ @printf ' fleet-status — at-a-glance health digest\n'
+ @printf ' restart — pm2 restart build-pages\n'
+ @printf ' logs — pm2 logs --nostream\n'
+
+start:
+ node server.js
+
+dev:
+ node server.js
+
+smoke:
+ node test/smoke.js
+
+smoke-quiet:
+ node test/smoke.js --quiet
+
+smoke-json:
+ node test/smoke.js --json | jq .
+
+fleet-smoke:
+ ~/Projects/_shared/scripts/fleet-smoke.sh
+
+fleet-status:
+ ~/Projects/_shared/scripts/fleet-status.sh
+
+restart:
+ pm2 restart build-pages
+
+logs:
+ pm2 logs build-pages --lines 40 --nostream
diff --git a/server.js b/server.js
index 2d12bde..835abe3 100644
--- a/server.js
+++ b/server.js
@@ -170,6 +170,12 @@ app.use((req, res, next) => {
});
app.use('/css', express.static(path.join(__dirname, 'public/css'), { maxAge: '1h' }));
+// robots.txt — let everything be crawled. /api/* is JSON discovery, public.
+app.get('/robots.txt', (_req, res) => {
+ res.setHeader('Cache-Control', 'public, max-age=86400');
+ res.type('text/plain').send('User-agent: *\nAllow: /\n');
+});
+
app.get('/healthz', (_req, res) => {
res.setHeader('Cache-Control', 'no-store');
res.json({ ok: true, ts: Date.now() });
diff --git a/test/smoke.js b/test/smoke.js
index 3770c97..83fd897 100644
--- a/test/smoke.js
+++ b/test/smoke.js
@@ -80,6 +80,11 @@ function check(name, cond, hint = '') {
r = await fetch('/p/nope-not-a-project');
check('unknown project: 404', r.status === 404);
+ // 8. robots.txt — public crawlable
+ r = await fetch('/robots.txt');
+ check('robots: 200', r.status === 200);
+ check('robots: allow all', /User-agent: \*/.test(r.body));
+
// Report
if (process.argv.includes('--json')) {
console.log(JSON.stringify({ base: BASE, pass, fail, total: pass + fail, checks, as_of: new Date().toISOString() }));
← 6e35230 smoke: 23-assertion harness covering healthz, /api/health, /
·
back to build-pages
·
registry: add asseeninmovies + starsofdesign + build-pages ( 99da4a9 →