Add index landing page for relay server

- Add index.html explaining what MacroPad Relay is
- Add /ping endpoint for container health checks
- Add route for index page

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-05 20:33:03 -08:00
parent 6e76d469c8
commit 5aed19564c
2 changed files with 184 additions and 0 deletions

View File

@@ -55,6 +55,16 @@ export function createServer() {
});
});
// Ping endpoint for container health checks
app.get('/ping', (req, res) => {
res.json({ status: 'ok' });
});
// Index page
app.get('/', (req, res) => {
res.sendFile(path.join(publicPath, 'index.html'));
});
// Login page for session
app.get('/:sessionId', (req, res) => {
const session = sessionManager.getSession(req.params.sessionId);