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

halffullheart

heartbeat

Public
Like
heartbeat
Home
Code
4
README.md
H
main.ts
C
monitor.ts
utils.ts
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
…
Viewing readonly version of main branch: v55
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
PricingNewsletterBlogAboutCareers
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.