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

trob

Todo

Public
Like
Todo
Home
Code
6
backend
1
frontend
1
.vtignore
AGENTS.md
README.md
deno.json
Branches
1
Pull requests
Remixes
History
Environment variables
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
/
/
x
/
trob
/
Todo
/
branch
/
main
/
version
/
8
/
code
/
README.md
/
README.md
Code
/
/
x
/
trob
/
Todo
/
branch
/
main
/
version
/
8
/
code
/
README.md
/
README.md
Search
11/12/2025
Viewing readonly version of main branch: v8
View latest version
README.md

Val Todo

Minimal Val Town todo template using a TypeScript Hono backend and a static frontend.

Running locally

deno run --allow-net --allow-read --allow-write backend/index.ts

The server listens on http://localhost:8000. Navigate there to see the todo UI. SQLite data is stored in the generated todo_app_entries_v1 table within the in-memory database file managed by the Val Town runtime.

Backend API

MethodPathDescription
GET/api/todosFetch all todos, sorted newest first.
POST/api/todosCreate a todo. JSON body: { "text": "Write tests" }.
PATCH/api/todos/:idUpdate done/text flag. JSON body can include done and/or text.
DELETE/api/todos/:idRemove the todo.

All responses are JSON. Error responses include { "error": "message" }.

Frontend

  • frontend/index.html bootstraps a Tailwind-styled UI.
  • Inline module script calls /api/todos to load, add, toggle, and delete tasks.
  • The view-source link is populated from the backend to comply with Val Town requirements.

Testing tips

Use curl or any HTTP client to exercise the API.

# create curl -X POST -H "Content-Type: application/json" -d '{"text":"Inspect Val Town"}' http://localhost:8000/api/todos # toggle done curl -X PATCH -H "Content-Type: application/json" -d '{"done":true}' http://localhost:8000/api/todos/1 # delete curl -X DELETE http://localhost:8000/api/todos/1

Observe logs and UI refreshing automatically after each action.

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
© 2025 Val Town, Inc.