[object Object]

← back to Abramsagency

harden: ensure data/ dir exists on startup (fresh-box safe)

a15d2824102ba063cd9ac20bf4ec05bf1f80dfba · 2026-08-13 11:07:26 -0700 · Steve Abrams

Files touched

Diff

commit a15d2824102ba063cd9ac20bf4ec05bf1f80dfba
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Thu Aug 13 11:07:26 2026 -0700

    harden: ensure data/ dir exists on startup (fresh-box safe)
---
 server.js | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/server.js b/server.js
index 08736ad..71e5691 100644
--- a/server.js
+++ b/server.js
@@ -24,6 +24,8 @@ async function notify(lead) {
   } catch (e) { console.warn('[lead] notify failed:', e.message); }  // never block the user on notify failure
 }
 
+try { fs.mkdirSync(path.dirname(DATA), { recursive: true }); } catch (_) {}  // ensure data/ exists on a fresh box
+
 app.use(express.json({ limit: '32kb' }));
 app.use(express.static(path.join(__dirname, 'public'), { extensions: ['html'] }));
 

← 1ac9fa4 lead form: optional George email notification (env-gated off  ·  back to Abramsagency  ·  add 'more of our work' strip: Wallpaper's Back, directories, bb835e9 →