Back to articles
How to Build Website Uptime Monitoring in 10 Minutes (Free, No Dependencies)

How to Build Website Uptime Monitoring in 10 Minutes (Free, No Dependencies)

via Dev.to JavaScriptOzor

You don't need Datadog, PagerDuty, or a $29/month plan to monitor your websites. With 40 lines of code and a free API, you can build uptime monitoring that actually alerts you when things break. Here's the complete setup. What We're Building A script that: Checks if your websites are up every 5 minutes Takes a screenshot when something goes down (proof of the failure) Sends you an alert via webhook (Slack, Discord, or email) Logs response times so you can spot slow degradation Runs on any machine (VPS, Raspberry Pi, GitHub Actions) The Code (Node.js) const https = require ( ' https ' ); const API_KEY = ' your-api-key ' ; // Free at frostbyte-api.ozorown.com const BASE = ' https://frostbyte-api.ozorown.com ' ; const WEBHOOK_URL = '' ; // Your Slack/Discord webhook (optional) const sites = [ { name : ' Main Site ' , url : ' https://example.com ' }, { name : ' API ' , url : ' https://api.example.com/health ' }, { name : ' Blog ' , url : ' https://blog.example.com ' }, ]; async function fe

Continue reading on Dev.to JavaScript

Opens in a new tab

Read Full Article
2 views

Related Articles