import http from 'node:http'; const originalEnd = http.ServerResponse.prototype.end; http.ServerResponse.prototype.end = function (chunk, encoding, callback) { const type = String(this.getHeader('content-type') || ''); if (typeof chunk === 'string' && type.startsWith('text/html') && chunk.includes('')) { const badge = '
v2 ยท live update
'; chunk = chunk.replace('', `${badge}`); } return originalEnd.call(this, chunk, encoding, callback); }; await import('./server.js');