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

stevekrouse

dan-polling

Public
Like
dan-polling
Home
Code
4
README.md
H
dashboard.tsx
C
hourly-email.ts
C
main.ts
Environment variables
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: v11
View latest version
README.md

dan-polling

Monitors Dan's ATProto DID endpoint every minute, stores results in SQLite, and sends an hourly email digest.

Architecture

Rendering mermaid diagram...

Files

FileTypeDescription
main.tsInterval (1 min)Polls the endpoint, records status code & latency into SQLite
hourly-email.tsInterval (1 hr)Queries SQLite for stats and sends an HTML email digest
dashboard.tsxHTTPWeb dashboard showing response time chart, stats, and poll log

Database

Uses a val-scoped SQLite database (std/sqlite@14-main) with a single table:

CREATE TABLE poll_log ( id INTEGER PRIMARY KEY AUTOINCREMENT, started_at TEXT NOT NULL, ended_at TEXT NOT NULL, duration_ms INTEGER NOT NULL, status_code INTEGER, error TEXT );

Email

Hourly digest emails are sent via std/email and include:

  • Last hour: poll count, uptime %, avg/min/max response time, error count
  • All time: total polls, uptime %, avg response time, total errors
  • Error table: recent failures with timestamps, status codes, and messages
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.