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

stevekrouse

reactHonoExample

Example with client-side React & Hono server
Public
Like
7
reactHonoExample
Home
Code
4
backend
3
frontend
5
shared
1
README.md
Branches
3
Pull requests
Remixes
22
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
/
README.md
Code
/
README.md
Search
2/25/2025
Viewing readonly version of main branch: v151
View latest version
README.md

React Hono Val Town Project Starter Template

This is a starter template for a full-stack app in a Val Town Project. The app itself is a simple persistent message board.

This app is broken up into three folders, corresponding to where the code in those folders run:

  • backend - runs on Val Town serverless infrastructure in Deno
  • frontend - runs in the user's browser
  • shared - runs in both the frontend and backend

The entrypoint of this app is backend/index.ts, which is the Hono HTTP server, which serves the HTML, CSS, and JS, which run client-side.

Backend

Hono

In this template, the backend uses Hono as the a server application framework. You can think of Hono as a replacement for ExpressJS that works in serverless environments like Val Town or Cloudflare Workers. If you come from Python or Ruby, Hono is also a lot like Flask or Sinatra, respectively.

SQLite

This app uses Val Town SQLite to manage data. Every Val Town account comes with a free SQLite database, hosted on Turso. In backend/database/migrations.ts, this app creates a new SQLite table reactHonoStarter_messages to store messages. This "migration" runs once on every app startup because it's imported in index.ts. You can comment this line out for a slight performance improvement on cold starts. It's left in so that users who fork this project will have the migration run correctly.

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.