import express from 'express'; import { listAccounts } from './db.js'; const app = express(); const port = process.env.PORT || 3210; app.get('/', async (req, res) => { const rows = await listAccounts(); res.setHeader('Content-Type', 'text/html; charset=utf-8'); res.end(` Verdent Accounts

Registered Accounts

${rows.map(r => ``).join('')}
EmailPasswordStatusCreatedExpires
${r.email}${r.password}${r.status}${fmt(r.created_at)}${fmt(r.expires_at)}
`); }); function fmt(d){ const dt=new Date(d);return dt.toISOString().replace('T',' ').slice(0,19); } app.listen(port, () => { console.log(`[WEB] Query page running at http://localhost:${port}`); });