← back to Museumwallpaper
Add clean-URL routes for /about and static info pages
55b94fc1e77f9a6ca226cc1ea2b02406d439e655 · 2026-05-19 08:06:14 -0700 · Steve Abrams
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Files touched
Diff
commit 55b94fc1e77f9a6ca226cc1ea2b02406d439e655
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Tue May 19 08:06:14 2026 -0700
Add clean-URL routes for /about and static info pages
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---
server.js | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/server.js b/server.js
index 211cb44..301e072 100644
--- a/server.js
+++ b/server.js
@@ -143,6 +143,19 @@ app.use((req, res, next) => {
});
app.use(express.static(path.join(__dirname, 'public')));
+// Clean-URL routes for extension-less nav links → static HTML pages.
+const CLEAN_URLS = {
+ '/about': 'history.html',
+ '/history': 'history.html',
+ '/care': 'care.html',
+ '/trade': 'trade.html',
+ '/sourcing': 'sourcing.html',
+ '/vocabulary': 'vocabulary.html',
+};
+for (const [route, file] of Object.entries(CLEAN_URLS)) {
+ app.get(route, (req, res) => res.sendFile(path.join(__dirname, 'public', file)));
+}
+
app.get('/api/products', (req, res) => {
const { q, aesthetic, vendor, page = 1, limit = 24, sort = 'newest'} = req.query;
let list = PRODUCTS_NICHE;
← de5ee39 Untrack backup snapshots, broaden .gitignore, add static .ba
·
back to Museumwallpaper
·
Add rel=noopener noreferrer to external target=_blank links 2c9c51b →