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

pchinjr

devfest26-raffle

Public
Like
devfest26-raffle
Home
Code
6
.vtignore
AGENTS.md
README.md
deno.json
H
main.http.ts
server.ts
Environment variables
1
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: v8
View latest version
README.md

NorfolkJS Raffle (Val Town)

90s wacky postmodern raffle landing page with:

  • Public entry form (name + email)
  • Admin-only draw panel
  • 3 prize slots with one unique winner each

Files

  • main.http.ts: Val Town HTTP entrypoint (export default app.fetch via Hono)
  • server.ts: compatibility re-export for existing local workflows

Run locally (Deno)

deno run -A --watch main.http.ts

Then open:

  • Public page: http://localhost:8000/
  • Admin page: http://localhost:8000/admin?key=your-secret-key

Configure admin key

Set an environment variable before running/deploying:

export ADMIN_KEY="your-secret-key"

Val Town deploy notes

  • Set main.http.ts file type to http in Val Town.
  • Set ADMIN_KEY in Val Town environment variables.
  • Visit /admin?key=... to draw and announce winners.

Behavior

  • One entry per unique email
  • Draw is random among entries that have not already won another prize
  • Each prize can be drawn only once
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.