Render, Railway, और अन्य free hosting services आपके server को 15 minutes inactivity के बाद sleep mode में डाल देती हैं।
GET /api/health
- Server status check करने के लिए
- Response:
{ status: 'healthy', timestamp: '...', uptime: 123 }
- Visit: https://uptimerobot.com
- Sign up for free account
- Add monitor:
- Type: HTTP(s)
- URL:
https://your-app.onrender.com/api/health - Interval: 5 minutes
- ✅ Your server will never sleep!
- Visit: https://cron-job.org
- Create free account
- Add cronjob:
- URL:
https://your-app.onrender.com/api/health - Schedule:
*/14 * * * *(every 14 minutes)
- URL:
# Run locally to keep server alive
node keep-alive.jsUse UptimeRobot - यह सबसे reliable है और आपको email alerts भी देता है अगर server down हो जाए।
- UptimeRobot dashboard से server uptime देख सकते हैं
- Email notifications मिलेंगे अगर कोई issue हो
- Deploy your app on Render
- Copy the URL
- Add to UptimeRobot
- Done! ✅ Server हमेशा alive रहेगा