import http from 'node:http'; const host = process.env.MAINTENANCE_HOST || '127.0.0.1'; const port = Number.parseInt(process.env.PORT || '43821', 10); const page = ` Update in progress

Update in progress

We’re making Synapsis better. We’ll be right back!

Checking for the node…
`; const server = http.createServer((request, response) => { response.writeHead(503, { 'Content-Type': 'text/html; charset=utf-8', 'Content-Length': Buffer.byteLength(page), 'Cache-Control': 'no-store, max-age=0', 'Retry-After': '30', 'X-Robots-Tag': 'noindex', }); if (request.method === 'HEAD') response.end(); else response.end(page); }); server.listen(port, host, () => { console.log(`Synapsis maintenance page listening on http://${host}:${port}`); }); const shutdown = () => server.close(() => process.exit(0)); process.on('SIGINT', shutdown); process.on('SIGTERM', shutdown);