Keeping bots online 24/7
Node.js5 min readlast updated 25 Nov 2026
Supervision
Our runtime restarts crashed processes automatically and streams logs. Make restarts cheap:
process.on("unhandledRejection", (err) => {
console.error("unhandled", err);
// keep state recoverable — exit and let the supervisor restart you clean
process.exit(1);
});
Health endpoint
Expose /healthz returning 200. We use it to gate zero-downtime deploys.
Rate limits
Respect upstream API limits — exponential backoff on 429s keeps your bot unbanned and your logs quiet.