diff --git a/public/404.html b/public/404.html new file mode 100644 index 0000000..4f66bcf --- /dev/null +++ b/public/404.html @@ -0,0 +1,175 @@ + + + + + + 404 – Page Not Found | Pediatric AI Scribe + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + ? + + + + + + + + + +
+ +
+ + Error 404 +
+ +

This page doesn't exist

+

The URL you visited isn't part of Pediatric AI Scribe.
It may have been mistyped or the link is outdated.

+ + + + Back to the app + + + +
+ + diff --git a/server.js b/server.js index 9fcb83e..e28f59d 100644 --- a/server.js +++ b/server.js @@ -155,13 +155,18 @@ app.use('/api', require('./src/routes/memories')); app.use('/api', require('./src/routes/wellVisit')); app.use('/api', require('./src/routes/sickVisit')); -app.get('*', (req, res) => { +app.get('/', (req, res) => { res.setHeader('Cache-Control', 'no-cache, no-store, must-revalidate'); res.setHeader('Pragma', 'no-cache'); res.setHeader('Expires', '0'); res.sendFile(path.join(__dirname, 'public', 'index.html')); }); +// 404 handler — must be last +app.use((req, res) => { + res.status(404).sendFile(path.join(__dirname, 'public', '404.html')); +}); + // Load prompt DB overrides after DB is ready (3s grace period) const PROMPTS = require('./src/utils/prompts'); const db = require('./src/db/database');