feat: add version badge to header displaying app version from package.json

This commit is contained in:
Trevor Mears
2026-01-11 23:31:34 -08:00
parent 5f24d7e264
commit 098dc3a8ce
4 changed files with 27 additions and 0 deletions
+6
View File
@@ -92,6 +92,12 @@ app.use('/api/probe', require('./routes/probe'));
app.use('/api/subtitle', require('./routes/subtitle'));
app.use('/api/settings', require('./routes/settings'));
// Version endpoint
app.get('/api/version', (req, res) => {
const pkg = require('../package.json');
res.json({ version: pkg.version });
});
// SPA fallback - serve index.html for all non-API routes
app.get('*', (req, res) => {
res.sendFile(path.join(__dirname, '..', 'public', 'index.html'));