• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
halffullheart

halffullheart

heartbeat

Public
Like
heartbeat
Home
Code
3
README.md
H
main.ts
C
monitor.ts
Connections
Environment variables
2
Branches
1
Pull requests
Remixes
History
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
README.md
Code
/
README.md
Search
2/21/2026
Viewing readonly version of main branch: v54
View latest version
README.md

πŸ–₯️ Home Server Monitor

Monitors a home server and sends a Pushcut notification if it goes offline.

How it works

  1. The home server pings POST /heartbeat every 15 minutes with a secret key
  2. monitor.ts runs every 15 minutes and checks if a heartbeat has been received in the last hour
  3. If not, a Pushcut notification is sent via NOTIFY_SERVER_DOWN_URL
  4. The status page at / renders the current state server-side β€” no client-side JS

Setup

Environment variables

VariableDescription
SECRET_KEYRequired on all heartbeat requests via x-secret-key header
NOTIFY_SERVER_DOWN_URLPushcut webhook URL to call when the server is down

Heartbeat cron job

Add this to your home server's crontab:

*/15 * * * * curl -X POST https://halffullheartbeat.val.run/heartbeat -H "x-secret-key: YOUR_SECRET_KEY"

Files

  • main.ts β€” Hono HTTP server; serves the status page and accepts heartbeats
  • monitor.ts β€” Interval val that checks for downtime and triggers notifications
FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
AboutAlternativesPricingBlogNewsletterCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
Β© 2026 Val Town, Inc.