devfest26-raffle
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.
Viewing readonly version of main branch: v18View latest version
90s wacky postmodern raffle landing page with:
- Public entry form (
name+email) - Admin-only draw panel
- 3 prize slots with one unique winner each
main.http.ts: Val Town HTTP entrypoint (export default app.fetchvia Hono)server.ts: compatibility re-export for existing local workflows
deno run -A --watch main.http.ts
Then open:
- Public page:
http://localhost:8000/ - Admin page:
http://localhost:8000/admin?key=your-secret-key
Set an environment variable before running/deploying:
export ADMIN_KEY="your-secret-key"
- Set
main.http.tsfile type tohttpin Val Town. - Set
ADMIN_KEYin Val Town environment variables. - Visit
/admin?key=...to draw and announce winners.
- One entry per unique email
- Prize pool is dynamic and managed from admin
- Entrants can choose one or more currently configured prizes
- Draw is random among entries that have not already won another prize
- Each prize can be drawn only once
- Admin panel shows all submissions
- Admin can reset entries and winners for test runs
