This val checks your website every 5 minutes and emails you (via Val Town's built-in std/email, to your account email) only when the status changes: one email when the site goes down, one when it recovers. The last known status is stored in blob storage, so you never get repeat alerts while the site stays down.
monitor.ts, change URL_TO_MONITOR to your website's URL.No API keys or environment variables needed. To test it, point URL_TO_MONITOR at a URL that 404s and run monitor.ts manually.